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

Unified Diff: third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.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/UnacceleratedImageBufferSurface.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp b/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
index cbdbd570fbf01f9ad8c1f63714fef6fad560e204..d4b245403cb3186dd02bb87ab8e624b3e2b36b9d 100644
--- a/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
+++ b/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
@@ -42,12 +42,13 @@ UnacceleratedImageBufferSurface::UnacceleratedImageBufferSurface(
const IntSize& size,
OpacityMode opacityMode,
ImageInitializationMode initializationMode,
- sk_sp<SkColorSpace> colorSpace)
- : ImageBufferSurface(size, opacityMode, colorSpace) {
+ sk_sp<SkColorSpace> colorSpace,
+ SkColorType colorType)
+ : ImageBufferSurface(size, opacityMode, colorSpace, colorType) {
SkAlphaType alphaType =
(Opaque == opacityMode) ? kOpaque_SkAlphaType : kPremul_SkAlphaType;
- SkImageInfo info =
- SkImageInfo::MakeN32(size.width(), size.height(), alphaType, colorSpace);
+ SkImageInfo info = SkImageInfo::Make(size.width(), size.height(), colorType,
+ alphaType, colorSpace);
SkSurfaceProps disableLCDProps(0, kUnknown_SkPixelGeometry);
m_surface =
SkSurface::MakeRaster(info, Opaque == opacityMode ? 0 : &disableLCDProps);

Powered by Google App Engine
This is Rietveld 408576698