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

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

Issue 2203903002: Color: Read embedded ICC profiles regardless of QCMS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update tests Created 4 years, 4 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/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 1390439648a4bbd767300fe45c3ee736ab1ead0f..180328041303ac23bdf9b5d472a183b5203bac5c 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp
@@ -93,11 +93,14 @@ bool ImageFrame::copyBitmapData(const ImageFrame& other)
return other.m_bitmap.copyTo(&m_bitmap, other.m_bitmap.colorType());
}
-bool ImageFrame::setSize(int newWidth, int newHeight)
+bool ImageFrame::setSizeAndColorProfile(int newWidth, int newHeight, const ICCProfile& newIccProfile)
{
- // setSize() should only be called once, it leaks memory otherwise.
+ // setSizeAndColorProfile() should only be called once, it leaks memory otherwise.
ASSERT(!width() && !height());
+ // TODO(ccameron): Populate the color space parameter of the SkImageInfo
+ // with newIccProfile, under a runtime flag.
+
m_bitmap.setInfo(SkImageInfo::MakeN32(newWidth, newHeight,
m_premultiplyAlpha ? kPremul_SkAlphaType : kUnpremul_SkAlphaType));
if (!m_bitmap.tryAllocPixels(m_allocator, 0))

Powered by Google App Engine
This is Rietveld 408576698