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

Unified Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include WebCompositorMutatorClient from WebLayerTreeView to allow unique_ptr usage. Created 4 years, 7 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: content/renderer/gpu/render_widget_compositor.cc
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
index 6304815d83ba16b291957adb15f4acda2fc50e5b..d6343116cef0536a45b2b8ca40d97d151c037bd1 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -23,6 +23,7 @@
#include "build/build_config.h"
#include "cc/animation/animation_host.h"
#include "cc/animation/animation_timeline.h"
+#include "cc/animation/layer_tree_mutator.h"
#include "cc/base/switches.h"
#include "cc/blink/web_layer_impl.h"
#include "cc/debug/layer_tree_debug_state.h"
@@ -51,6 +52,7 @@
#include "gpu/command_buffer/client/gles2_interface.h"
#include "gpu/command_buffer/service/gpu_switches.h"
#include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallback.h"
+#include "third_party/WebKit/public/platform/WebCompositorMutatorClient.h"
#include "third_party/WebKit/public/platform/WebLayoutAndPaintAsyncCallback.h"
#include "third_party/WebKit/public/platform/WebSize.h"
#include "third_party/WebKit/public/web/WebKit.h"
@@ -728,6 +730,12 @@ void RenderWidgetCompositor::clearSelection() {
layer_tree_host_->RegisterSelection(empty_selection);
}
+void RenderWidgetCompositor::setMutatorClient(
+ std::unique_ptr<blink::WebCompositorMutatorClient> client) {
+ TRACE_EVENT0("compositor-worker", "RenderWidgetCompositor::setMutatorClient");
+ layer_tree_host_->SetLayerTreeMutator(std::move(client));
+}
+
static_assert(static_cast<cc::EventListenerClass>(
blink::WebEventListenerClass::TouchStartOrMove) ==
cc::EventListenerClass::kTouchStartOrMove,
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | third_party/WebKit/Source/core/dom/CompositorProxyClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698