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

Unified Diff: third_party/WebKit/Source/platform/graphics/Image.cpp

Issue 1309393007: [poc] redecode Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: resetColorProfileForTesting rename Created 5 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/graphics/Image.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Image.cpp b/third_party/WebKit/Source/platform/graphics/Image.cpp
index e06cf388b158dacdb761e8cd8c8d2473160bf96d..c17b7b80510b2102bed24e747cd7fa95993c2421 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Image.cpp
@@ -37,8 +37,10 @@
#include "platform/geometry/FloatRect.h"
#include "platform/geometry/FloatSize.h"
#include "platform/graphics/BitmapImage.h"
+#include "platform/graphics/ColorSpaceProfile.h"
#include "platform/graphics/DeferredImageDecoder.h"
#include "platform/graphics/GraphicsContext.h"
+#include "platform/graphics/GraphicsScreen.h"
#include "public/platform/Platform.h"
#include "public/platform/WebData.h"
#include "third_party/skia/include/core/SkCanvas.h"
@@ -214,6 +216,9 @@ void Image::drawPattern(GraphicsContext* context, const FloatRect& floatSrcRect,
{
TRACE_EVENT0("skia", "Image::drawPattern");
+ if (imageColorProfilesEnabled() && isBitmapImage() && toBitmapImage(this)->hasColorProfile())
+ toBitmapImage(this)->notifyDeviceProfile(screenColorProfile(currentScreenId()).get());
+
RefPtr<SkImage> image = imageForCurrentFrame();
if (!image)
return;

Powered by Google App Engine
This is Rietveld 408576698