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 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1128 m_layer->layer()->setScrollClient(0); | 1128 m_layer->layer()->setScrollClient(0); |
1129 else | 1129 else |
1130 m_layer->layer()->setScrollClient(this); | 1130 m_layer->layer()->setScrollClient(this); |
1131 } | 1131 } |
1132 | 1132 |
1133 void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip) | 1133 void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip) |
1134 { | 1134 { |
1135 paintGraphicsLayerContents(context, clip); | 1135 paintGraphicsLayerContents(context, clip); |
1136 } | 1136 } |
1137 | 1137 |
| 1138 void GraphicsLayer::paint(GraphicsContext& context) |
| 1139 { |
| 1140 // TODO(chrishtr: fix this rect to instead derive interest rect during paint
(crbug.com/486603). |
| 1141 paintGraphicsLayerContents(context, LayoutRect::infiniteIntRect()); |
| 1142 } |
1138 | 1143 |
1139 void GraphicsLayer::notifyAnimationStarted(double monotonicTime, int group) | 1144 void GraphicsLayer::notifyAnimationStarted(double monotonicTime, int group) |
1140 { | 1145 { |
1141 if (m_client) | 1146 if (m_client) |
1142 m_client->notifyAnimationStarted(this, monotonicTime, group); | 1147 m_client->notifyAnimationStarted(this, monotonicTime, group); |
1143 } | 1148 } |
1144 | 1149 |
1145 void GraphicsLayer::notifyAnimationFinished(double, int group) | 1150 void GraphicsLayer::notifyAnimationFinished(double, int group) |
1146 { | 1151 { |
1147 if (m_scrollableArea) | 1152 if (m_scrollableArea) |
(...skipping 13 matching lines...) Expand all Loading... |
1161 | 1166 |
1162 DisplayItemList* GraphicsLayer::displayItemList() | 1167 DisplayItemList* GraphicsLayer::displayItemList() |
1163 { | 1168 { |
1164 if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) | 1169 if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) |
1165 return 0; | 1170 return 0; |
1166 if (!m_displayItemList) | 1171 if (!m_displayItemList) |
1167 m_displayItemList = DisplayItemList::create(); | 1172 m_displayItemList = DisplayItemList::create(); |
1168 return m_displayItemList.get(); | 1173 return m_displayItemList.get(); |
1169 } | 1174 } |
1170 | 1175 |
| 1176 const DisplayItemTransformTree* GraphicsLayer::transformTree() const |
| 1177 { |
| 1178 // Should be returning a web version of the transfor tree instead. |
| 1179 return 0; |
| 1180 } |
| 1181 |
| 1182 void GraphicsLayer::setTransformTree(PassOwnPtr<const DisplayItemTransformTree>
transformTree) |
| 1183 { |
| 1184 m_transformTree = transformTree; |
| 1185 } |
| 1186 |
| 1187 const DisplayList* GraphicsLayer::displayList() const |
| 1188 { |
| 1189 return m_displayList.get(); |
| 1190 } |
| 1191 |
| 1192 void GraphicsLayer::setDisplayList(PassOwnPtr<DisplayList> displayList) |
| 1193 { |
| 1194 m_displayList = displayList; |
| 1195 } |
| 1196 |
1171 } // namespace blink | 1197 } // namespace blink |
1172 | 1198 |
1173 #ifndef NDEBUG | 1199 #ifndef NDEBUG |
1174 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) | 1200 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) |
1175 { | 1201 { |
1176 if (!layer) { | 1202 if (!layer) { |
1177 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1203 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
1178 return; | 1204 return; |
1179 } | 1205 } |
1180 | 1206 |
1181 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1207 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
1182 fprintf(stderr, "%s\n", output.utf8().data()); | 1208 fprintf(stderr, "%s\n", output.utf8().data()); |
1183 } | 1209 } |
1184 #endif | 1210 #endif |
OLD | NEW |