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

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

Issue 2278193002: Legacy-srgb should mean srgb when colorCorrectRendering is enabled. (Closed)
Patch Set: Remvoing the status of color correction feature from runtime enabled features. 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 case kSRGBCanvasColorSpace: 72 case kSRGBCanvasColorSpace:
73 return SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); 73 return SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
74 case kLinearRGBCanvasColorSpace: 74 case kLinearRGBCanvasColorSpace:
75 { 75 {
76 // Creating a temp srgb colorspace just to get the matrix. 76 // Creating a temp srgb colorspace just to get the matrix.
77 // There should be a better way 77 // There should be a better way
78 sk_sp<SkColorSpace> tmp = SkColorSpace::NewNamed(SkColorSpace::kSRGB _Named); 78 sk_sp<SkColorSpace> tmp = SkColorSpace::NewNamed(SkColorSpace::kSRGB _Named);
79 return SkColorSpace::NewRGB(SkColorSpace::kLinear_GammaNamed, tmp->x yz()); 79 return SkColorSpace::NewRGB(SkColorSpace::kLinear_GammaNamed, tmp->x yz());
80 } 80 }
81 case kLegacyCanvasColorSpace: 81 case kLegacyCanvasColorSpace:
82 // TODO(crbug.com/637381): To uncomment the following block of code we n eed
83 // it to not cause a bunch of test failures.
84 /*
85 if (RuntimeEnabledFeatures::colorCorrectRenderingEnabled()) { 82 if (RuntimeEnabledFeatures::colorCorrectRenderingEnabled()) {
86 // Legacy colorspace ensures color matching with CSS is preserved. 83 // Legacy colorspace ensures color matching with CSS is preserved.
87 // So if CSS is color corrected from sRGB to display space, then 84 // So if CSS is color corrected from sRGB to display space, then
88 // canvas must do the same 85 // canvas must do the same
89 return SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); 86 return SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
90 } 87 }
91 */
92 return nullptr; 88 return nullptr;
93 }; 89 };
94 CHECK(false); 90 CHECK(false);
95 return nullptr; 91 return nullptr;
96 } 92 }
97 93
98 void CanvasRenderingContext::dispose() 94 void CanvasRenderingContext::dispose()
99 { 95 {
100 // HTMLCanvasElement and CanvasRenderingContext have a circular reference. 96 // HTMLCanvasElement and CanvasRenderingContext have a circular reference.
101 // When the pair is no longer reachable, their destruction order is non- 97 // When the pair is no longer reachable, their destruction order is non-
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 return taintOrigin; 152 return taintOrigin;
157 } 153 }
158 154
159 DEFINE_TRACE(CanvasRenderingContext) 155 DEFINE_TRACE(CanvasRenderingContext)
160 { 156 {
161 visitor->trace(m_canvas); 157 visitor->trace(m_canvas);
162 visitor->trace(m_offscreenCanvas); 158 visitor->trace(m_offscreenCanvas);
163 } 159 }
164 160
165 } // namespace blink 161 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698