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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.h

Issue 2552893005: Add ColorBehavior to GraphicsLayer and GraphicsContext (Closed)
Patch Set: Rebase Created 4 years 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/platform/graphics/GraphicsContext.h
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContext.h b/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
index f4a56f72e5a1db900fd0c11db1ccea189c1516b8..cde5384814a73dddabd6835ed2ac4023145d75fd 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
@@ -30,6 +30,7 @@
#include "platform/PlatformExport.h"
#include "platform/fonts/Font.h"
+#include "platform/graphics/ColorBehavior.h"
#include "platform/graphics/DashArray.h"
#include "platform/graphics/DrawLooperBuilder.h"
#include "platform/graphics/GraphicsContextState.h"
@@ -70,9 +71,11 @@ class PLATFORM_EXPORT GraphicsContext {
// the context from performance tests.
};
- explicit GraphicsContext(PaintController&,
- DisabledMode = NothingDisabled,
- SkMetaData* = 0);
+ explicit GraphicsContext(
+ PaintController&,
+ DisabledMode = NothingDisabled,
+ SkMetaData* = 0,
+ ColorBehavior = ColorBehavior::transformToGlobalTarget());
~GraphicsContext();
@@ -80,6 +83,7 @@ class PLATFORM_EXPORT GraphicsContext {
const SkCanvas* canvas() const { return m_canvas; }
PaintController& getPaintController() { return m_paintController; }
+ const ColorBehavior& getColorBehavior() const { return m_colorBehavior; }
bool contextDisabled() const { return m_disabledState; }
@@ -446,6 +450,8 @@ class PLATFORM_EXPORT GraphicsContext {
SkMetaData m_metaData;
+ const ColorBehavior m_colorBehavior;
+
#if DCHECK_IS_ON()
int m_layerCount;
bool m_disableDestructionChecks;

Powered by Google App Engine
This is Rietveld 408576698