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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2051333005: Let FrameView track object paint invalidations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TrackInvalidation
Patch Set: NeedsRebaseline Created 4 years, 6 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: third_party/WebKit/Source/core/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 0b905f9a7de1aa1979980029b5f49d369558d4f8..8c25729a8bc850f2430012ae84c6c13e2d0cce6c 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -69,6 +69,7 @@
#include "core/paint/TransformRecorder.h"
#include "core/svg/SVGDocumentExtensions.h"
#include "platform/DragImage.h"
+#include "platform/JSONValues.h"
#include "platform/PluginScriptForbiddenScope.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/ScriptForbiddenScope.h"
@@ -738,7 +739,18 @@ String LocalFrame::layerTreeAsText(unsigned flags) const
if (contentLayoutItem().isNull())
return String();
- return contentLayoutItem().compositor()->layerTreeAsText(static_cast<LayerTreeFlags>(flags));
+ RefPtr<JSONObject> layerTree = contentLayoutItem().compositor()->layerTreeAsJSON(static_cast<LayerTreeFlags>(flags));
+
+ if (flags & LayerTreeIncludesPaintInvalidations) {
+ RefPtr<JSONArray> objectPaintInvalidations = m_view->trackedObjectPaintInvalidationsAsJSON();
+ if (objectPaintInvalidations) {
+ if (!layerTree)
+ layerTree = JSONObject::create();
+ layerTree->setArray("objectPaintInvalidations", objectPaintInvalidations);
+ }
+ }
+
+ return layerTree ? layerTree->toPrettyJSONString() : String();
}
bool LocalFrame::shouldThrottleRendering() const
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | third_party/WebKit/Source/core/layout/LayoutBlockFlow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698