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

Unified Diff: Source/platform/graphics/GraphicsLayer.cpp

Issue 498193003: Add |GraphicsLayerDebugInfo::getAnnotatedInvalidationRects| (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tkent-san 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/graphics/GraphicsLayer.h ('k') | Source/platform/graphics/GraphicsLayerDebugInfo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsLayer.cpp
diff --git a/Source/platform/graphics/GraphicsLayer.cpp b/Source/platform/graphics/GraphicsLayer.cpp
index 649ab82e2683b5da128a9af3a5715149d0b009f5..7b95b13fd04c684d561bf1cbb1422de6f01bf86c 100644
--- a/Source/platform/graphics/GraphicsLayer.cpp
+++ b/Source/platform/graphics/GraphicsLayer.cpp
@@ -29,8 +29,10 @@
#include "SkImageFilter.h"
#include "SkMatrix44.h"
+#include "platform/TraceEvent.h"
#include "platform/geometry/FloatRect.h"
#include "platform/geometry/LayoutRect.h"
+#include "platform/graphics/FirstPaintInvalidationTracking.h"
#include "platform/graphics/GraphicsLayerFactory.h"
#include "platform/graphics/Image.h"
#include "platform/graphics/filters/SkiaImageFilterBuilder.h"
@@ -273,6 +275,8 @@ void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const I
{
if (!m_client)
return;
+ if (firstPaintInvalidationTrackingEnabled())
+ m_debugInfo.clearAnnotatedInvalidateRects();
incrementPaintCount();
m_client->paintContents(this, context, m_paintingPhase, clip);
}
@@ -897,10 +901,12 @@ void GraphicsLayer::setNeedsDisplay()
}
}
-void GraphicsLayer::setNeedsDisplayInRect(const FloatRect& rect)
+void GraphicsLayer::setNeedsDisplayInRect(const FloatRect& rect, WebInvalidationDebugAnnotations annotations)
{
if (drawsContent()) {
m_layer->layer()->invalidateRect(rect);
+ if (firstPaintInvalidationTrackingEnabled())
+ m_debugInfo.appendAnnotatedInvalidateRect(rect, annotations);
addRepaintRect(rect);
for (size_t i = 0; i < m_linkHighlights.size(); ++i)
m_linkHighlights[i]->invalidate();
« no previous file with comments | « Source/platform/graphics/GraphicsLayer.h ('k') | Source/platform/graphics/GraphicsLayerDebugInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698