| OLD | NEW |
| 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 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1057 if (rect == m_contentsRect) | 1057 if (rect == m_contentsRect) |
| 1058 return; | 1058 return; |
| 1059 | 1059 |
| 1060 m_contentsRect = rect; | 1060 m_contentsRect = rect; |
| 1061 updateContentsRect(); | 1061 updateContentsRect(); |
| 1062 } | 1062 } |
| 1063 | 1063 |
| 1064 void GraphicsLayer::setContentsToImage( | 1064 void GraphicsLayer::setContentsToImage( |
| 1065 Image* image, | 1065 Image* image, |
| 1066 RespectImageOrientationEnum respectImageOrientation) { | 1066 RespectImageOrientationEnum respectImageOrientation) { |
| 1067 sk_sp<SkImage> skImage = image ? image->imageForCurrentFrame( | 1067 sk_sp<SkImage> skImage = image ? image->imageForCurrentFrame() : nullptr; |
| 1068 ColorBehavior::transformToGlobalTarget()) | |
| 1069 : nullptr; | |
| 1070 | 1068 |
| 1071 if (image && skImage && image->isBitmapImage()) { | 1069 if (image && skImage && image->isBitmapImage()) { |
| 1072 if (respectImageOrientation == RespectImageOrientation) { | 1070 if (respectImageOrientation == RespectImageOrientation) { |
| 1073 ImageOrientation imageOrientation = | 1071 ImageOrientation imageOrientation = |
| 1074 toBitmapImage(image)->currentFrameOrientation(); | 1072 toBitmapImage(image)->currentFrameOrientation(); |
| 1075 skImage = | 1073 skImage = |
| 1076 DragImage::resizeAndOrientImage(std::move(skImage), imageOrientation); | 1074 DragImage::resizeAndOrientImage(std::move(skImage), imageOrientation); |
| 1077 } | 1075 } |
| 1078 } | 1076 } |
| 1079 | 1077 |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1310 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { | 1308 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { |
| 1311 if (!layer) { | 1309 if (!layer) { |
| 1312 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil)."; | 1310 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil)."; |
| 1313 return; | 1311 return; |
| 1314 } | 1312 } |
| 1315 | 1313 |
| 1316 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1314 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1317 LOG(INFO) << output.utf8().data(); | 1315 LOG(INFO) << output.utf8().data(); |
| 1318 } | 1316 } |
| 1319 #endif | 1317 #endif |
| OLD | NEW |