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 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1148 if (!m_paintController) | 1148 if (!m_paintController) |
1149 m_paintController = PaintController::create(); | 1149 m_paintController = PaintController::create(); |
1150 return *m_paintController; | 1150 return *m_paintController; |
1151 } | 1151 } |
1152 | 1152 |
1153 void GraphicsLayer::setElementId(const CompositorElementId& id) { | 1153 void GraphicsLayer::setElementId(const CompositorElementId& id) { |
1154 if (WebLayer* layer = platformLayer()) | 1154 if (WebLayer* layer = platformLayer()) |
1155 layer->setElementId(id); | 1155 layer->setElementId(id); |
1156 } | 1156 } |
1157 | 1157 |
| 1158 CompositorElementId GraphicsLayer::elementId() const { |
| 1159 if (WebLayer* layer = platformLayer()) |
| 1160 return layer->elementId(); |
| 1161 return CompositorElementId(); |
| 1162 } |
| 1163 |
1158 void GraphicsLayer::setCompositorMutableProperties(uint32_t properties) { | 1164 void GraphicsLayer::setCompositorMutableProperties(uint32_t properties) { |
1159 if (WebLayer* layer = platformLayer()) | 1165 if (WebLayer* layer = platformLayer()) |
1160 layer->setCompositorMutableProperties(properties); | 1166 layer->setCompositorMutableProperties(properties); |
1161 } | 1167 } |
1162 | 1168 |
1163 sk_sp<SkPicture> GraphicsLayer::capturePicture() { | 1169 sk_sp<SkPicture> GraphicsLayer::capturePicture() { |
1164 if (!drawsContent()) | 1170 if (!drawsContent()) |
1165 return nullptr; | 1171 return nullptr; |
1166 | 1172 |
1167 IntSize intSize = expandedIntSize(size()); | 1173 IntSize intSize = expandedIntSize(size()); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1274 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { | 1280 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { |
1275 if (!layer) { | 1281 if (!layer) { |
1276 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1282 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
1277 return; | 1283 return; |
1278 } | 1284 } |
1279 | 1285 |
1280 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1286 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
1281 fprintf(stderr, "%s\n", output.utf8().data()); | 1287 fprintf(stderr, "%s\n", output.utf8().data()); |
1282 } | 1288 } |
1283 #endif | 1289 #endif |
OLD | NEW |