| 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 aaf33831899d843bca629adb615a885a1ec6f7f2..76d23bf515e2463a0ac29ce777ec79243e4d7b0a 100644
|
| --- a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
|
| +++ b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
|
| @@ -29,20 +29,26 @@
|
| #include "core/CoreExport.h"
|
| #include "core/html/HTMLCanvasElement.h"
|
| #include "core/offscreencanvas/OffscreenCanvas.h"
|
| +#include "third_party/skia/include/core/SkColorSpace.h"
|
| #include "wtf/HashSet.h"
|
| #include "wtf/Noncopyable.h"
|
| #include "wtf/text/StringHash.h"
|
|
|
| class SkCanvas;
|
|
|
| -namespace blink { class WebLayer; }
|
| -
|
| namespace blink {
|
|
|
| class CanvasImageSource;
|
| class HTMLCanvasElement;
|
| class ImageData;
|
| class ImageBitmap;
|
| +class WebLayer;
|
| +
|
| +enum CanvasColorSpace {
|
| + kLegacyCanvasColorSpace,
|
| + kSRGBCanvasColorSpace,
|
| + kLinearRGBCanvasColorSpace,
|
| +};
|
|
|
| class CORE_EXPORT CanvasRenderingContext : public GarbageCollectedFinalized<CanvasRenderingContext>, public ScriptWrappable {
|
| WTF_MAKE_NONCOPYABLE(CanvasRenderingContext);
|
| @@ -69,6 +75,10 @@ public:
|
|
|
| HTMLCanvasElement* canvas() const { return m_canvas; }
|
|
|
| + CanvasColorSpace colorSpace() const { return m_colorSpace; };
|
| + WTF::String colorSpaceAsString() const;
|
| + sk_sp<SkColorSpace> skColorSpace() const;
|
| +
|
| virtual ContextType getContextType() const = 0;
|
| virtual bool isAccelerated() const { return false; }
|
| virtual bool shouldAntialias() const { return false; }
|
| @@ -134,7 +144,7 @@ public:
|
| void detachCanvas() { m_canvas = nullptr; }
|
|
|
| protected:
|
| - CanvasRenderingContext(HTMLCanvasElement* = nullptr, OffscreenCanvas* = nullptr);
|
| + CanvasRenderingContext(HTMLCanvasElement*, OffscreenCanvas*, const String& colorSpace);
|
| DECLARE_VIRTUAL_TRACE();
|
| virtual void stop() = 0;
|
|
|
| @@ -145,6 +155,7 @@ private:
|
| Member<OffscreenCanvas> m_offscreenCanvas;
|
| HashSet<String> m_cleanURLs;
|
| HashSet<String> m_dirtyURLs;
|
| + CanvasColorSpace m_colorSpace;
|
| };
|
|
|
| } // namespace blink
|
|
|