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

Unified Diff: Source/platform/graphics/GraphicsLayerDebugInfo.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/GraphicsLayerDebugInfo.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsLayerDebugInfo.cpp
diff --git a/Source/platform/graphics/GraphicsLayerDebugInfo.cpp b/Source/platform/graphics/GraphicsLayerDebugInfo.cpp
index 0bc8464abb5958e0e265c29e5c3f1827fdf9b85d..e288a5f803ea5248f3e8fa4b42315cb7bdf37df0 100644
--- a/Source/platform/graphics/GraphicsLayerDebugInfo.cpp
+++ b/Source/platform/graphics/GraphicsLayerDebugInfo.cpp
@@ -20,6 +20,8 @@
#include "config.h"
#include "platform/graphics/GraphicsLayerDebugInfo.h"
+#include "public/platform/WebGraphicsLayerDebugInfo.h"
+#include "public/platform/WebVector.h"
#include "wtf/text/CString.h"
@@ -42,6 +44,11 @@ void GraphicsLayerDebugInfo::appendAsTraceFormat(WebString* out) const
*out = jsonObject->toJSONString();
}
+void GraphicsLayerDebugInfo::getAnnotatedInvalidationRects(WebVector<WebAnnotatedInvalidationRect>& result) const
+{
+ result.assign(m_invalidations.data(), m_invalidations.size());
+}
+
GraphicsLayerDebugInfo* GraphicsLayerDebugInfo::clone() const
{
GraphicsLayerDebugInfo* toReturn = new GraphicsLayerDebugInfo();
@@ -49,6 +56,7 @@ GraphicsLayerDebugInfo* GraphicsLayerDebugInfo::clone() const
toReturn->currentLayoutRects().append(m_currentLayoutRects[i]);
toReturn->setCompositingReasons(m_compositingReasons);
toReturn->setOwnerNodeId(m_ownerNodeId);
+ toReturn->m_invalidations = m_invalidations;
return toReturn;
}
@@ -96,4 +104,18 @@ void GraphicsLayerDebugInfo::appendOwnerNodeId(JSONObject* jsonObject) const
jsonObject->setNumber("owner_node", m_ownerNodeId);
}
+void GraphicsLayerDebugInfo::appendAnnotatedInvalidateRect(const FloatRect& rect, WebInvalidationDebugAnnotations annotations)
+{
+ WebAnnotatedInvalidationRect annotatedRect = {
+ WebFloatRect(rect),
+ annotations
+ };
+ m_invalidations.append(annotatedRect);
+}
+
+void GraphicsLayerDebugInfo::clearAnnotatedInvalidateRects()
+{
+ m_invalidations.clear();
+}
+
} // namespace blink
« no previous file with comments | « Source/platform/graphics/GraphicsLayerDebugInfo.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698