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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp

Issue 2523943002: Explicitly specify target color space to ImageDecoder at creation (Closed)
Patch Set: Rebase Created 4 years, 1 month 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/image-decoders/ImageFrame.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp b/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp
index 89395a6ad27770279c2af849a00e120e7819c119..7fadc7b32dca79bd1e661d3369e03e9bbe46cde4 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp
@@ -110,21 +110,10 @@ bool ImageFrame::setSizeAndColorSpace(int newWidth,
// otherwise.
DCHECK(!width() && !height());
- // The image must specify a color space.
- // TODO(ccameron): This should be set unconditionally, but specifying a
- // non-renderable SkColorSpace results in errors.
- // https://bugs.chromium.org/p/skia/issues/detail?id=5907
- if (RuntimeEnabledFeatures::colorCorrectRenderingEnabled()) {
- DCHECK(colorSpace);
- m_colorSpace = std::move(colorSpace);
- } else {
- DCHECK(!colorSpace);
- }
-
m_bitmap.setInfo(SkImageInfo::MakeN32(
newWidth, newHeight,
m_premultiplyAlpha ? kPremul_SkAlphaType : kUnpremul_SkAlphaType,
- m_colorSpace));
+ std::move(colorSpace)));
if (!m_bitmap.tryAllocPixels(m_allocator, 0))
return false;

Powered by Google App Engine
This is Rietveld 408576698