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

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

Issue 1238123004: Slimming Paint phase 2 compositing algorithm plumbing & skeleton display list API. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 months 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 | Annotate | Revision Log
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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 m_layer->layer()->setScrollClient(0); 1105 m_layer->layer()->setScrollClient(0);
1106 else 1106 else
1107 m_layer->layer()->setScrollClient(this); 1107 m_layer->layer()->setScrollClient(this);
1108 } 1108 }
1109 1109
1110 void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip) 1110 void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip)
1111 { 1111 {
1112 paintGraphicsLayerContents(context, clip); 1112 paintGraphicsLayerContents(context, clip);
1113 } 1113 }
1114 1114
1115 void GraphicsLayer::paint(GraphicsContext& context)
1116 {
1117 // TODO(chrishtr: fix this rect to instead derive interest rect during paint (crbug.com/486603).
1118 paintGraphicsLayerContents(context, LayoutRect::infiniteIntRect());
1119 }
1115 1120
1116 void GraphicsLayer::notifyAnimationStarted(double monotonicTime, int group) 1121 void GraphicsLayer::notifyAnimationStarted(double monotonicTime, int group)
1117 { 1122 {
1118 if (m_client) 1123 if (m_client)
1119 m_client->notifyAnimationStarted(this, monotonicTime, group); 1124 m_client->notifyAnimationStarted(this, monotonicTime, group);
1120 } 1125 }
1121 1126
1122 void GraphicsLayer::notifyAnimationFinished(double, int group) 1127 void GraphicsLayer::notifyAnimationFinished(double, int group)
1123 { 1128 {
1124 if (m_scrollableArea) 1129 if (m_scrollableArea)
(...skipping 13 matching lines...) Expand all
1138 1143
1139 DisplayItemList* GraphicsLayer::displayItemList() 1144 DisplayItemList* GraphicsLayer::displayItemList()
1140 { 1145 {
1141 if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) 1146 if (!RuntimeEnabledFeatures::slimmingPaintEnabled())
1142 return 0; 1147 return 0;
1143 if (!m_displayItemList) 1148 if (!m_displayItemList)
1144 m_displayItemList = DisplayItemList::create(); 1149 m_displayItemList = DisplayItemList::create();
1145 return m_displayItemList.get(); 1150 return m_displayItemList.get();
1146 } 1151 }
1147 1152
1153 const DisplayItemTransformTree* GraphicsLayer::transformTree() const
1154 {
1155 // Should be returning a web version of the transfor tree instead.
1156 return 0;
1157 }
1158
1159 void GraphicsLayer::setTransformTree(PassOwnPtr<const DisplayItemTransformTree> transformTree)
1160 {
1161 m_transformTree = transformTree;
1162 }
1163
1164 const DisplayList* GraphicsLayer::displayList() const
1165 {
1166 return m_displayList.get();
1167 }
1168
1169 void GraphicsLayer::setDisplayList(PassOwnPtr<DisplayList> displayList)
1170 {
1171 m_displayList = displayList;
1172 }
1173
1148 } // namespace blink 1174 } // namespace blink
1149 1175
1150 #ifndef NDEBUG 1176 #ifndef NDEBUG
1151 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) 1177 void showGraphicsLayerTree(const blink::GraphicsLayer* layer)
1152 { 1178 {
1153 if (!layer) { 1179 if (!layer) {
1154 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); 1180 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n");
1155 return; 1181 return;
1156 } 1182 }
1157 1183
1158 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1184 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1159 fprintf(stderr, "%s\n", output.utf8().data()); 1185 fprintf(stderr, "%s\n", output.utf8().data());
1160 } 1186 }
1161 #endif 1187 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698