chromium/third_party/blink/renderer/platform/graphics/canvas_color_params.h

// 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.

#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_CANVAS_COLOR_PARAMS_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_CANVAS_COLOR_PARAMS_H_

#include "third_party/blink/renderer/platform/graphics/graphics_types.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/skia/include/core/SkColorSpace.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "ui/gfx/buffer_types.h"

namespace gfx {
class ColorSpace;
}

namespace WTF {
class String;
}  // namespace WTF

namespace blink {

// Return the gfx::ColorSpace for the specified `predefined_color_space`.
gfx::ColorSpace PLATFORM_EXPORT
PredefinedColorSpaceToGfxColorSpace(PredefinedColorSpace color_space);

// Return the SkColorSpace for the specified |color_space|.
sk_sp<SkColorSpace> PLATFORM_EXPORT
PredefinedColorSpaceToSkColorSpace(PredefinedColorSpace color_space);

// Return the named PredefinedColorSpace that best matches |sk_color_space|.
PredefinedColorSpace PLATFORM_EXPORT
PredefinedColorSpaceFromSkColorSpace(const SkColorSpace* sk_color_space);

// Return the SkColorType that best matches the specified CanvasPixelFormat.
SkColorType PLATFORM_EXPORT
CanvasPixelFormatToSkColorType(CanvasPixelFormat pixel_format);

class PLATFORM_EXPORT CanvasColorParams {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_CANVAS_COLOR_PARAMS_H_