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(); |