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

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

Issue 2425113002: Fix the linear-rgb canvas color space so that it renders (Closed)
Patch Set: Created 4 years, 2 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/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 a17e8958c228a943000422b26292fa962a16ed0d..ed37a3c9af1b568acf7fdfdf549ccf67c76e96fe 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
@@ -89,6 +89,15 @@ sk_sp<SkColorSpace> CanvasRenderingContext::skColorSpace() const {
return nullptr;
}
+SkColorType CanvasRenderingContext::colorType() const {
+ switch (m_colorSpace) {
+ case kLinearRGBCanvasColorSpace:
+ return kRGBA_F16_SkColorType;
+ default:
+ return kN32_SkColorType;
+ }
+}
+
void CanvasRenderingContext::dispose() {
// HTMLCanvasElement and CanvasRenderingContext have a circular reference.
// When the pair is no longer reachable, their destruction order is non-

Powered by Google App Engine
This is Rietveld 408576698