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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.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/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp b/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp
index f4e2ec0192b06e8e5f9984f42d40589b2cb3e687..065aa6c5bd320df31d10ecc244547d596119647b 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp
@@ -42,8 +42,9 @@ namespace blink {
AcceleratedImageBufferSurface::AcceleratedImageBufferSurface(
const IntSize& size,
OpacityMode opacityMode,
- sk_sp<SkColorSpace> colorSpace)
- : ImageBufferSurface(size, opacityMode, colorSpace) {
+ sk_sp<SkColorSpace> colorSpace,
+ SkColorType colorType)
+ : ImageBufferSurface(size, opacityMode, colorSpace, colorType) {
if (!SharedGpuContext::isValid())
return;
GrContext* grContext = SharedGpuContext::gr();
@@ -52,8 +53,8 @@ AcceleratedImageBufferSurface::AcceleratedImageBufferSurface(
SkAlphaType alphaType =
(Opaque == opacityMode) ? kOpaque_SkAlphaType : kPremul_SkAlphaType;
- SkImageInfo info =
- SkImageInfo::MakeN32(size.width(), size.height(), alphaType);
+ SkImageInfo info = SkImageInfo::Make(size.width(), size.height(), colorType,
+ alphaType, colorSpace);
SkSurfaceProps disableLCDProps(0, kUnknown_SkPixelGeometry);
m_surface = SkSurface::MakeRenderTarget(
grContext, SkBudgeted::kYes, info, 0 /* sampleCount */,

Powered by Google App Engine
This is Rietveld 408576698