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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1796293003: Image decode color: Push color profile from browser to renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix windows tests Created 4 years, 9 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/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index c95ff4cfa344853cc5ae7c593179ea79f0fd582b..b37db0b9bc7aa3300379a3c4d5a33f6fada545fd 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -119,6 +119,7 @@
#include "platform/graphics/ImageBuffer.h"
#include "platform/graphics/gpu/DrawingBuffer.h"
#include "platform/graphics/paint/DrawingRecorder.h"
+#include "platform/image-decoders/ImageDecoder.h"
#include "platform/scroll/ScrollbarTheme.h"
#include "platform/weborigin/SchemeRegistry.h"
#include "public/platform/Platform.h"
@@ -3190,13 +3191,13 @@ void WebViewImpl::setZoomFactorForDeviceScaleFactor(float zoomFactorForDeviceSca
void WebViewImpl::setDeviceColorProfile(const WebVector<char>& colorProfile)
{
- if (!page())
- return;
-
Vector<char> deviceProfile;
deviceProfile.append(colorProfile.data(), colorProfile.size());
- page()->setDeviceColorProfile(deviceProfile);
+ ImageDecoder::setOutputDeviceColorProfile(deviceProfile);
+
+ if (page())
+ page()->setDeviceColorProfile(deviceProfile);
}
void WebViewImpl::resetDeviceColorProfileForTesting()

Powered by Google App Engine
This is Rietveld 408576698