/* * Copyright 2025 Google LLC. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkSpanPriv_DEFINED #define SkSpanPriv_DEFINED #include "include/core/SkSpan.h" #include "include/private/base/SkMalloc.h" #include class SkSpanPriv { public: template static bool EQ(SkSpan a, SkSpan b) { if (a.size() != b.size()) { return false; } if (a.empty()) { return true; } return (a.data() == b.data()) || std::equal(a.begin(), a.end(), b.begin()); } template static void Copy(SkSpan dst, SkSpan src) { SkASSERT(dst.size() == src.size()); sk_careful_memcpy(dst.data(), src.data(), src.size_bytes()); } }; #endif