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

Unified Diff: third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp

Issue 2322853002: Clean up uses of SkColorSpace::GammaNamed (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
index abf15f25083478ccce3ddd0bfaa0c81b1e5168f5..ce3eb467f85f7efd128d36ba9b37660f6fd1adb2 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
@@ -72,12 +72,7 @@ sk_sp<SkColorSpace> CanvasRenderingContext::skColorSpace() const
case kSRGBCanvasColorSpace:
return SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
case kLinearRGBCanvasColorSpace:
- {
- // Creating a temp srgb colorspace just to get the matrix.
- // There should be a better way
- sk_sp<SkColorSpace> tmp = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
- return SkColorSpace::NewRGB(SkColorSpace::kLinear_GammaNamed, tmp->xyz());
- }
+ return SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named)->makeLinearGamma();
case kLegacyCanvasColorSpace:
if (RuntimeEnabledFeatures::colorCorrectRenderingEnabled()) {
// Legacy colorspace ensures color matching with CSS is preserved.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698