| Index: third_party/WebKit/Source/platform/graphics/CanvasColorParams.h
|
| diff --git a/third_party/WebKit/Source/platform/graphics/CanvasColorParams.h b/third_party/WebKit/Source/platform/graphics/CanvasColorParams.h
|
| index daf034af488f2357efa27308fe6833a770fc0c95..32d2c1b6e96196289df9fa46602c19e552a35235 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/CanvasColorParams.h
|
| +++ b/third_party/WebKit/Source/platform/graphics/CanvasColorParams.h
|
| @@ -31,22 +31,33 @@ enum CanvasPixelFormat {
|
|
|
| class PLATFORM_EXPORT CanvasColorParams {
|
| public:
|
| + // The default constructor will create an output-blended 8-bit surface.
|
| + CanvasColorParams();
|
| CanvasColorParams(CanvasColorSpace, CanvasPixelFormat);
|
| CanvasColorSpace color_space() const { return color_space_; }
|
| CanvasPixelFormat pixel_format() const { return pixel_format_; }
|
|
|
| + // Returns true if the canvas uses blends output color space values (that is,
|
| + // not linear space colors).
|
| + bool UsesOutputSpaceBlending() const;
|
| +
|
| // The SkColorSpace to use in the SkImageInfo for allocated SkSurfaces. This
|
| // is nullptr in legacy rendering mode.
|
| sk_sp<SkColorSpace> GetSkColorSpaceForSkSurfaces() const;
|
|
|
| // The pixel format to use for allocating SkSurfaces.
|
| SkColorType GetSkColorType() const;
|
| + uint8_t BytesPerPixel() const;
|
|
|
| - // The color space to use for compositing.
|
| + // The color space to use for compositing. This will always return a valid
|
| + // gfx or skia color space.
|
| gfx::ColorSpace GetGfxColorSpace() const;
|
| + sk_sp<SkColorSpace> GetSkColorSpace() const;
|
|
|
| // This matches CanvasRenderingContext::LinearPixelMath, and is true only when
|
| // the pixel format is half-float linear.
|
| + // TODO(ccameron): This is not the same as !UsesOutputSpaceBlending, but
|
| + // perhaps should be.
|
| bool LinearPixelMath() const;
|
|
|
| private:
|
|
|