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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 2559013002: Add ColorBehavior to blink::Image draw methods (Closed)
Patch Set: Rebase Created 4 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 if (rect == m_contentsRect) 1085 if (rect == m_contentsRect)
1086 return; 1086 return;
1087 1087
1088 m_contentsRect = rect; 1088 m_contentsRect = rect;
1089 updateContentsRect(); 1089 updateContentsRect();
1090 } 1090 }
1091 1091
1092 void GraphicsLayer::setContentsToImage( 1092 void GraphicsLayer::setContentsToImage(
1093 Image* image, 1093 Image* image,
1094 RespectImageOrientationEnum respectImageOrientation) { 1094 RespectImageOrientationEnum respectImageOrientation) {
1095 sk_sp<SkImage> skImage = image ? image->imageForCurrentFrame() : nullptr; 1095 sk_sp<SkImage> skImage =
1096 image ? image->imageForCurrentFrame(m_colorBehavior) : nullptr;
1096 1097
1097 if (image && skImage && image->isBitmapImage()) { 1098 if (image && skImage && image->isBitmapImage()) {
1098 if (respectImageOrientation == RespectImageOrientation) { 1099 if (respectImageOrientation == RespectImageOrientation) {
1099 ImageOrientation imageOrientation = 1100 ImageOrientation imageOrientation =
1100 toBitmapImage(image)->currentFrameOrientation(); 1101 toBitmapImage(image)->currentFrameOrientation();
1101 skImage = 1102 skImage =
1102 DragImage::resizeAndOrientImage(std::move(skImage), imageOrientation); 1103 DragImage::resizeAndOrientImage(std::move(skImage), imageOrientation);
1103 } 1104 }
1104 } 1105 }
1105 1106
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { 1353 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) {
1353 if (!layer) { 1354 if (!layer) {
1354 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil)."; 1355 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil).";
1355 return; 1356 return;
1356 } 1357 }
1357 1358
1358 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1359 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1359 LOG(INFO) << output.utf8().data(); 1360 LOG(INFO) << output.utf8().data();
1360 } 1361 }
1361 #endif 1362 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp ('k') | third_party/WebKit/Source/platform/graphics/Image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698