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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.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/GraphicsLayer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
index 49ac850229fd9d192345a3dd47b76d2dffbceb3e..3639b5fb462c6df962d7345e27d3fe3e6e66e06b 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -39,6 +39,7 @@
#include "platform/graphics/FirstPaintInvalidationTracking.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/GraphicsLayerFactory.h"
+#include "platform/graphics/GraphicsScreen.h"
#include "platform/graphics/Image.h"
#include "platform/graphics/LinkHighlight.h"
#include "platform/graphics/filters/SkiaImageFilterBuilder.h"
@@ -1061,9 +1062,14 @@ void GraphicsLayer::setContentsRect(const IntRect& rect)
void GraphicsLayer::setContentsToImage(Image* image, RespectImageOrientationEnum respectImageOrientation)
{
+ if (image && imageColorProfilesEnabled() && image->isBitmapImage() && toBitmapImage(image)->hasColorProfile()) {
+ toBitmapImage(image)->notifyDeviceProfile(screenColorProfile(currentScreenId()).get());
+ RELEASE_ASSERT(currentScreenId());
+ }
+
RefPtr<SkImage> skImage = image ? image->imageForCurrentFrame() : nullptr;
- if (image && skImage && image->isBitmapImage()) {
+ if (skImage && image->isBitmapImage()) {
if (respectImageOrientation == RespectImageOrientation) {
ImageOrientation imageOrientation = toBitmapImage(image)->currentFrameOrientation();
skImage = DragImage::resizeAndOrientImage(skImage.release(), imageOrientation);

Powered by Google App Engine
This is Rietveld 408576698