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

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

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « content/renderer/gpu/render_widget_compositor.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 74aae79f48e2d3dfb8ab96b41942c94c1c4f9448..8a2a86d49fcefcaf085ef4e162ec3cfa66996fa1 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -20,9 +20,12 @@
#include "base/values.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/mutation_conversions.h"
#include "cc/blink/web_compositor_animation_timeline_impl.h"
#include "cc/blink/web_layer_impl.h"
+#include "cc/blink/web_mutator_client_impl.h"
#include "cc/debug/layer_tree_debug_state.h"
#include "cc/debug/micro_benchmark.h"
#include "cc/input/layer_selection_bound.h"
@@ -47,6 +50,7 @@
#include "gpu/command_buffer/service/gpu_switches.h"
#include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallback.h"
#include "third_party/WebKit/public/platform/WebLayoutAndPaintAsyncCallback.h"
+#include "third_party/WebKit/public/platform/WebMutatorClient.h"
#include "third_party/WebKit/public/platform/WebSize.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
@@ -832,6 +836,12 @@ void RenderWidgetCompositor::setShowScrollBottleneckRects(bool show) {
layer_tree_host_->SetDebugState(debug_state);
}
+void RenderWidgetCompositor::setMutatorClient(blink::WebMutatorClient* client) {
+ TRACE_EVENT0("compositor-worker", "RenderWidgetCompositor::setMutatorClient");
+ layer_tree_host_->SetLayerTreeMutator(
+ static_cast<cc_blink::WebMutatorClientImpl*>(client));
+}
+
void RenderWidgetCompositor::updateTopControlsState(
WebTopControlsState constraints,
WebTopControlsState current,
@@ -895,6 +905,15 @@ void RenderWidgetCompositor::ApplyViewportDeltas(
top_controls_delta);
}
+void RenderWidgetCompositor::ApplyMutations(
+ const cc::LayerTreeMutationMap& mutations) {
+ TRACE_EVENT0("compositor-worker",
+ "RenderWidgetCompositor::ApplyMutations");
+ blink::WebMutationMap blink_mutations;
+ cc_blink::convertToBlinkMutations(mutations, &blink_mutations);
+ widget_->webwidget()->applyMutations(blink_mutations);
+}
+
void RenderWidgetCompositor::RequestNewOutputSurface() {
// If the host is closing, then no more compositing is possible. This
// prevents shutdown races between handling the close message and
@@ -940,6 +959,7 @@ void RenderWidgetCompositor::DidCommit() {
DCHECK(!temporary_copy_output_request_);
widget_->DidCommitCompositorFrame();
compositor_deps_->GetRendererScheduler()->DidCommitFrameToCompositor();
+ widget_->webwidget()->didCommit();
}
void RenderWidgetCompositor::DidCommitAndDrawFrame() {
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698