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

Unified Diff: webkit/renderer/compositor_bindings/web_layer_impl.cc

Issue 61883006: Compositor thread plumbing for layout rectangle debug info. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed reviewer comments. Created 7 years, 1 month 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: webkit/renderer/compositor_bindings/web_layer_impl.cc
diff --git a/webkit/renderer/compositor_bindings/web_layer_impl.cc b/webkit/renderer/compositor_bindings/web_layer_impl.cc
index 950f76e93a3e441b73ec5637a8c943ea2cdc44ab..25c6c802980046742800a0a6611ce8422fb1a5b3 100644
--- a/webkit/renderer/compositor_bindings/web_layer_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_layer_impl.cc
@@ -5,6 +5,7 @@
#include "webkit/renderer/compositor_bindings/web_layer_impl.h"
#include "base/bind.h"
+#include "base/debug/trace_event_impl.h"
#include "base/strings/string_util.h"
#include "cc/animation/animation.h"
#include "cc/base/region.h"
@@ -13,6 +14,7 @@
#include "third_party/WebKit/public/platform/WebCompositingReasons.h"
#include "third_party/WebKit/public/platform/WebFloatPoint.h"
#include "third_party/WebKit/public/platform/WebFloatRect.h"
+#include "third_party/WebKit/public/platform/WebGraphicsLayerDebugInfo.h"
#include "third_party/WebKit/public/platform/WebLayerClient.h"
#include "third_party/WebKit/public/platform/WebLayerPositionConstraint.h"
#include "third_party/WebKit/public/platform/WebLayerScrollClient.h"
@@ -372,6 +374,27 @@ void WebLayerImpl::setWebLayerClient(blink::WebLayerClient* client) {
web_layer_client_ = client;
}
+class TracedDebugInfo : public base::debug::ConvertableToTraceFormat {
+ public:
+ explicit TracedDebugInfo(blink::WebGraphicsLayerDebugInfo* debug_info) :
+ debug_info_(debug_info) {}
+ virtual void AppendAsTraceFormat(std::string* out) const {
+ std::string str;
+ debug_info_->AppendAsTraceFormat(&str);
+ out->append(str);
+ }
+
+ virtual ~TracedDebugInfo() {
+ delete debug_info_;
enne (OOO) 2013/11/25 20:16:45 Should debug_info_ be a scoped_ptr member since it
chrishtr_gmail.com 2013/11/25 22:48:25 Done.
+ }
+ blink::WebGraphicsLayerDebugInfo* debug_info_;
+};
+
+void WebLayerImpl::setDebugInfo(
enne (OOO) 2013/11/25 20:16:45 So right now this is Blink pushing debug info into
chrishtr_gmail.com 2013/11/25 22:48:25 No, I don't want it to be pull right now. Putting
enne (OOO) 2013/11/25 22:49:32 sgtm
+ blink::WebGraphicsLayerDebugInfo* debug_info) {
+ layer_->SetDebugInfo(new TracedDebugInfo(debug_info));
+}
+
std::string WebLayerImpl::DebugName() {
if (!web_layer_client_)
return std::string();
« cc/layers/layer_impl.cc ('K') | « webkit/renderer/compositor_bindings/web_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698