From 40fe3752d3db5956d2bea53d846dbb1f37b27a2c Mon Sep 17 00:00:00 2001 From: "enne@chromium.org" Date: Tue, 12 Aug 2014 01:43:06 +0000 Subject: Make SingleThreadProxy a SchedulerClient This makes ui::Compositor no longer in charge of scheduling commits and draws, deferring it to cc::Scheduler. Other compositors that use SingleThreadProxy are left calling composite synchronously and now pass a flag to indicate that this is their intention. This patch doesn't remove synchronous composite, but now makes it mutually exclusive with scheduling. BUG=329552, 287250 Review URL: https://codereview.chromium.org/134623005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288866 0039d316-1c4b-4281-b951-d872f2087c98 --- android_webview/browser/hardware_renderer.cc | 7 +++++-- android_webview/browser/hardware_renderer.h | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'android_webview') diff --git a/android_webview/browser/hardware_renderer.cc b/android_webview/browser/hardware_renderer.cc index 818d3c5..86dd667 100644 --- a/android_webview/browser/hardware_renderer.cc +++ b/android_webview/browser/hardware_renderer.cc @@ -93,8 +93,11 @@ HardwareRenderer::HardwareRenderer(SharedRendererState* state) // Webview does not own the surface so should not clear it. settings.should_clear_root_render_pass = false; - layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded( - this, this, NULL, settings, NULL); + // TODO(enne): Update this this compositor to use a synchronous scheduler. + settings.single_thread_proxy_scheduler = false; + + layer_tree_host_ = + cc::LayerTreeHost::CreateSingleThreaded(this, this, NULL, settings, NULL); layer_tree_host_->SetRootLayer(root_layer_); layer_tree_host_->SetLayerTreeHostClientReady(); layer_tree_host_->set_has_transparent_background(true); diff --git a/android_webview/browser/hardware_renderer.h b/android_webview/browser/hardware_renderer.h index f87890b..b07d36d 100644 --- a/android_webview/browser/hardware_renderer.h +++ b/android_webview/browser/hardware_renderer.h @@ -54,8 +54,6 @@ class HardwareRenderer : public cc::LayerTreeHostClient, virtual void DidCompleteSwapBuffers() OVERRIDE {} // cc::LayerTreeHostSingleThreadClient overrides. - virtual void ScheduleComposite() OVERRIDE {} - virtual void ScheduleAnimation() OVERRIDE {} virtual void DidPostSwapBuffers() OVERRIDE {} virtual void DidAbortSwapBuffers() OVERRIDE {} -- cgit v1.1