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

Unified Diff: third_party/WebKit/Source/platform/mac/GraphicsContextCanvas.mm

Issue 2873333002: mac color: Use sRGB for native controls instead of device RGB (Closed)
Patch Set: And roll in the image decode bit Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutThemeMac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/mac/GraphicsContextCanvas.mm
diff --git a/third_party/WebKit/Source/platform/mac/GraphicsContextCanvas.mm b/third_party/WebKit/Source/platform/mac/GraphicsContextCanvas.mm
index 8601bcb8b84522c1f74f7afc5efa780170ec2676..1960a1d85c21297ef5f14bba6fd6419eaa8fed26 100644
--- a/third_party/WebKit/Source/platform/mac/GraphicsContextCanvas.mm
+++ b/third_party/WebKit/Source/platform/mac/GraphicsContextCanvas.mm
@@ -7,6 +7,7 @@
#import <AppKit/AppKit.h>
#import <CoreGraphics/CoreGraphics.h>
+#include "platform/RuntimeEnabledFeatures.h"
#include "platform/wtf/RetainPtr.h"
#include "skia/ext/skia_utils_mac.h"
@@ -76,7 +77,10 @@
// Allocate an offscreen and draw into that, relying on the
// compositing step to apply skia's clip.
- WTF::RetainPtr<CGColorSpace> color_space(CGColorSpaceCreateDeviceRGB());
+ WTF::RetainPtr<CGColorSpace> color_space(
+ RuntimeEnabledFeatures::colorCorrectRenderingEnabled()
+ ? CGColorSpaceCreateWithName(kCGColorSpaceSRGB)
+ : CGColorSpaceCreateDeviceRGB());
bool result = offscreen_.tryAllocN32Pixels(
SkScalarCeilToInt(bitmap_scale_factor_ * clip_bounds.width()),
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutThemeMac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698