chromium/third_party/blink/renderer/platform/graphics/color_correction_test_utils.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/platform/graphics/color_correction_test_utils.h"

#include "base/containers/heap_array.h"
#include "base/notreached.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/modules/skcms/skcms.h"

namespace blink {

bool ColorCorrectionTestUtils::IsNearlyTheSame(float expected,
                                               float actual,
                                               float tolerance) {}

sk_sp<SkColorSpace> ColorCorrectionTestUtils::ColorSpinSkColorSpace() {}

void ColorCorrectionTestUtils::CompareColorCorrectedPixels(
    const void* actual_pixels,
    const void* expected_pixels,
    size_t num_pixels,
    PixelFormat pixel_format,
    PixelsAlphaMultiply alpha_multiplied,
    UnpremulRoundTripTolerance premul_unpremul_tolerance) {}

bool ColorCorrectionTestUtils::ConvertPixelsToColorSpaceAndPixelFormatForTest(
    void* src_data,
    size_t num_elements,
    PredefinedColorSpace src_color_space,
    ImageDataStorageFormat src_storage_format,
    PredefinedColorSpace dst_color_space,
    CanvasPixelFormat dst_canvas_pixel_format,
    std::unique_ptr<uint8_t[]>& converted_pixels,
    PixelFormat pixel_format_for_f16_canvas) {}

bool ColorCorrectionTestUtils::MatchColorSpace(
    sk_sp<SkColorSpace> src_color_space,
    sk_sp<SkColorSpace> dst_color_space) {}

bool ColorCorrectionTestUtils::MatchSkImages(sk_sp<SkImage> src_image,
                                             sk_sp<SkImage> dst_image,
                                             unsigned uint8_tolerance,
                                             float f16_tolerance,
                                             bool compare_alpha) {}

}  // namespace blink