Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(866)

Unified Diff: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h

Issue 2797213002: Fix BaseRenderingContext2D create/put/get-ImageData() for color managed canvas (Closed)
Patch Set: Rebaseline Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h
diff --git a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h
index 3b2703f77018436063a8469e49b4f5ce5279dba3..dae7dd3a4fd4c4a1a83028c9a7b6db4480eb14a8 100644
--- a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h
+++ b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h
@@ -8,6 +8,7 @@
#include "bindings/modules/v8/CSSImageValueOrHTMLImageElementOrSVGImageElementOrHTMLVideoElementOrHTMLCanvasElementOrImageBitmapOrOffscreenCanvas.h"
#include "bindings/modules/v8/StringOrCanvasGradientOrCanvasPattern.h"
#include "core/html/ImageData.h"
+#include "core/html/canvas/CanvasRenderingContext.h"
fserb 2017/04/11 03:21:44 no need for this anymore.
zakerinasab 2017/04/11 19:52:59 Done.
#include "modules/ModulesExport.h"
#include "modules/canvas2d/CanvasGradient.h"
#include "modules/canvas2d/CanvasPathMethods.h"
@@ -238,6 +239,16 @@ class MODULES_EXPORT BaseRenderingContext2D : public GarbageCollectedMixin,
virtual void WillDrawImage(CanvasImageSource*) const {}
+ virtual CanvasColorSpace ColorSpace() const {
+ return kLegacyCanvasColorSpace;
+ };
+ virtual String ColorSpaceAsString() const {
+ return kLegacyCanvasColorSpaceName;
+ }
+ virtual CanvasPixelFormat PixelFormat() const {
+ return kRGBA8CanvasPixelFormat;
+ }
+
void RestoreMatrixClipStack(PaintCanvas*) const;
DECLARE_VIRTUAL_TRACE();
@@ -372,6 +383,10 @@ class MODULES_EXPORT BaseRenderingContext2D : public GarbageCollectedMixin,
void ClearCanvas();
bool RectContainsTransformedRect(const FloatRect&, const SkIRect&) const;
+
+ bool ColorSettingsAsImageDataColorSettings(ImageDataColorSettings&) const;
fserb 2017/04/11 03:21:44 can we name this with a verb? Do you mean somethin
zakerinasab 2017/04/11 19:52:59 This method converts the canvas color settings (if
+
+ bool is_color_managed_;
};
template <typename DrawFunc, typename ContainsFunc>

Powered by Google App Engine
This is Rietveld 408576698