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

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

Issue 498193003: Add |GraphicsLayerDebugInfo::getAnnotatedInvalidationRects| (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix wrong if 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
Index: Source/platform/graphics/GraphicsLayer.cpp
diff --git a/Source/platform/graphics/GraphicsLayer.cpp b/Source/platform/graphics/GraphicsLayer.cpp
index 649ab82e2683b5da128a9af3a5715149d0b009f5..1fab8ae1ac5efa9dc39290cfbb198a84d35d3a3b 100644
--- a/Source/platform/graphics/GraphicsLayer.cpp
+++ b/Source/platform/graphics/GraphicsLayer.cpp
@@ -1,5 +1,4 @@
-/*
- * Copyright (C) 2009 Apple Inc. All rights reserved.
+/* * Copyright (C) 2009 Apple Inc. All rights reserved.
tkent 2014/09/10 00:03:28 accidental edit?
kouhei (in TOK) 2014/09/10 23:46:29 Done.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -29,8 +28,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 +274,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 +900,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();

Powered by Google App Engine
This is Rietveld 408576698