Index: third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h |
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h |
index a7bc7ddc4e97f4540a43c2514e2bf9ab22cd826b..6186c7fb4f96970c7bfb35630ae4827bcae6c621 100644 |
--- a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h |
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h |
@@ -50,11 +50,17 @@ class WebLayer; |
enum CanvasColorSpace { |
kLegacyCanvasColorSpace, |
kSRGBCanvasColorSpace, |
- kLinearRGBCanvasColorSpace, |
kRec2020CanvasColorSpace, |
kP3CanvasColorSpace, |
}; |
+enum CanvasPixelFormat { |
+ kRGBA8CanvasPixelFormat, |
+ kRGB10A2CanvasPixelFormat, |
+ kRGBA12CanvasPixelFormat, |
+ kF16CanvasPixelFormat, |
+}; |
+ |
class CORE_EXPORT CanvasRenderingContext |
: public GarbageCollectedFinalized<CanvasRenderingContext>, |
public ScriptWrappable, |
@@ -88,6 +94,10 @@ class CORE_EXPORT CanvasRenderingContext |
CanvasColorSpace colorSpace() const { return m_colorSpace; }; |
WTF::String colorSpaceAsString() const; |
+ CanvasPixelFormat pixelFormat() const { return m_pixelFormat; }; |
+ WTF::String pixelFormatAsString() const; |
+ bool linearPixelMath() const { return m_linearPixelMath; }; |
+ |
// The color space in which the the content should be interpreted by the |
// compositor. This is always defined. |
gfx::ColorSpace gfxColorSpace() const; |
@@ -209,6 +219,8 @@ class CORE_EXPORT CanvasRenderingContext |
HashSet<String> m_cleanURLs; |
HashSet<String> m_dirtyURLs; |
CanvasColorSpace m_colorSpace; |
+ CanvasPixelFormat m_pixelFormat; |
+ bool m_linearPixelMath = false; |
CanvasContextCreationAttributes m_creationAttributes; |
bool m_finalizeFrameScheduled = false; |
}; |