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

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

Issue 474793002: Add GraphicsLayerDebugInfo::includesNewPaintInvalidation to distinguish paint from new RenderObjects (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review Created 6 years, 3 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 266
267 // If the compositing layer offset changes, we need to repaint. 267 // If the compositing layer offset changes, we need to repaint.
268 if (shouldSetNeedsDisplay == SetNeedsDisplay) 268 if (shouldSetNeedsDisplay == SetNeedsDisplay)
269 setNeedsDisplay(); 269 setNeedsDisplay();
270 } 270 }
271 271
272 void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const I ntRect& clip) 272 void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const I ntRect& clip)
273 { 273 {
274 if (!m_client) 274 if (!m_client)
275 return; 275 return;
276 m_debugInfo.setIncludesFirstPaintInvalidation(false);
276 incrementPaintCount(); 277 incrementPaintCount();
277 m_client->paintContents(this, context, m_paintingPhase, clip); 278 m_client->paintContents(this, context, m_paintingPhase, clip);
278 } 279 }
279 280
280 void GraphicsLayer::updateChildList() 281 void GraphicsLayer::updateChildList()
281 { 282 {
282 WebLayer* childHost = m_layer->layer(); 283 WebLayer* childHost = m_layer->layer();
283 childHost->removeAllChildren(); 284 childHost->removeAllChildren();
284 285
285 clearContentsLayerIfUnregistered(); 286 clearContentsLayerIfUnregistered();
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 void GraphicsLayer::setNeedsDisplayInRect(const FloatRect& rect) 901 void GraphicsLayer::setNeedsDisplayInRect(const FloatRect& rect)
901 { 902 {
902 if (drawsContent()) { 903 if (drawsContent()) {
903 m_layer->layer()->invalidateRect(rect); 904 m_layer->layer()->invalidateRect(rect);
904 addRepaintRect(rect); 905 addRepaintRect(rect);
905 for (size_t i = 0; i < m_linkHighlights.size(); ++i) 906 for (size_t i = 0; i < m_linkHighlights.size(); ++i)
906 m_linkHighlights[i]->invalidate(); 907 m_linkHighlights[i]->invalidate();
907 } 908 }
908 } 909 }
909 910
911 void GraphicsLayer::setIncludesFirstPaintInvalidation()
912 {
913 m_debugInfo.setIncludesFirstPaintInvalidation(true);
914 }
915
910 void GraphicsLayer::setContentsRect(const IntRect& rect) 916 void GraphicsLayer::setContentsRect(const IntRect& rect)
911 { 917 {
912 if (rect == m_contentsRect) 918 if (rect == m_contentsRect)
913 return; 919 return;
914 920
915 m_contentsRect = rect; 921 m_contentsRect = rect;
916 updateContentsRect(); 922 updateContentsRect();
917 } 923 }
918 924
919 void GraphicsLayer::setContentsToImage(Image* image) 925 void GraphicsLayer::setContentsToImage(Image* image)
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 #ifndef NDEBUG 1062 #ifndef NDEBUG
1057 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) 1063 void showGraphicsLayerTree(const blink::GraphicsLayer* layer)
1058 { 1064 {
1059 if (!layer) 1065 if (!layer)
1060 return; 1066 return;
1061 1067
1062 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1068 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1063 fprintf(stderr, "%s\n", output.utf8().data()); 1069 fprintf(stderr, "%s\n", output.utf8().data());
1064 } 1070 }
1065 #endif 1071 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698