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

Unified Diff: cc/blink/web_layer_impl.cc

Issue 1419913002: Remove blink::WebLayerClient and WebGraphicsLayerDebugInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge with origin/master, use base::StringPiece to avoid copies, and obey `gn format` Created 5 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
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | cc/layers/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/blink/web_layer_impl.cc
diff --git a/cc/blink/web_layer_impl.cc b/cc/blink/web_layer_impl.cc
index 726cfa6c060f25277b93c740ce9c3ae69dc2ec66..bde0bdf1925251f036aeeaffef70051c76fdd42e 100644
--- a/cc/blink/web_layer_impl.cc
+++ b/cc/blink/web_layer_impl.cc
@@ -25,8 +25,6 @@
#include "cc/trees/layer_tree_host.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"
#include "third_party/WebKit/public/platform/WebSize.h"
@@ -54,20 +52,15 @@ base::LazyInstance<cc::LayerSettings> g_layer_settings =
WebLayerImpl::WebLayerImpl()
: layer_(Layer::Create(LayerSettings())), contents_opaque_is_fixed_(false) {
- web_layer_client_ = nullptr;
- layer_->SetLayerClient(this);
}
WebLayerImpl::WebLayerImpl(scoped_refptr<Layer> layer)
: layer_(layer), contents_opaque_is_fixed_(false) {
- web_layer_client_ = nullptr;
- layer_->SetLayerClient(this);
}
WebLayerImpl::~WebLayerImpl() {
if (animation_delegate_adapter_.get())
layer_->set_layer_animation_delegate(nullptr);
- web_layer_client_ = nullptr;
layer_->SetLayerClient(nullptr);
}
@@ -493,39 +486,12 @@ bool WebLayerImpl::isOrphan() const {
return !layer_->layer_tree_host();
}
-void WebLayerImpl::setWebLayerClient(blink::WebLayerClient* client) {
- web_layer_client_ = client;
+void WebLayerImpl::setLayerClient(cc::LayerClient* client) {
+ layer_->SetLayerClient(client);
}
-class TracedDebugInfo : public base::trace_event::ConvertableToTraceFormat {
- public:
- // This object takes ownership of the debug_info object.
- explicit TracedDebugInfo(blink::WebGraphicsLayerDebugInfo* debug_info)
- : debug_info_(debug_info) {}
- void AppendAsTraceFormat(std::string* out) const override {
- DCHECK(thread_checker_.CalledOnValidThread());
- blink::WebString web_string;
- debug_info_->appendAsTraceFormat(&web_string);
- out->append(web_string.utf8());
- }
-
- private:
- ~TracedDebugInfo() override {}
- scoped_ptr<blink::WebGraphicsLayerDebugInfo> debug_info_;
- base::ThreadChecker thread_checker_;
-};
-
-scoped_refptr<base::trace_event::ConvertableToTraceFormat>
-WebLayerImpl::TakeDebugInfo() {
- if (!web_layer_client_)
- return nullptr;
- blink::WebGraphicsLayerDebugInfo* debug_info =
- web_layer_client_->takeDebugInfoFor(this);
-
- if (debug_info)
- return new TracedDebugInfo(debug_info);
- else
- return nullptr;
+const cc::Layer* WebLayerImpl::ccLayer() const {
+ return layer_.get();
}
void WebLayerImpl::setScrollParent(blink::WebLayer* parent) {
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698