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

Unified Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 342413005: Revert of Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | content/renderer/gpu/render_widget_compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/compositor_impl_android.cc
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index 2be0077a8f15d892d4b4dd1b49d124a8391c8ede..6232bcdb434467966c7e2ba5b0d99ad07063a930 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -314,6 +314,7 @@
// animation updates that will already be reflected in the current frame
// we are about to draw.
ignore_schedule_composite_ = true;
+ client_->Layout();
const base::TimeTicks frame_time = gfx::FrameTime::Now();
if (needs_animate_) {
@@ -401,6 +402,7 @@
} else if (!host_) {
DCHECK(!WillComposite());
needs_composite_ = false;
+ needs_animate_ = false;
pending_swapbuffers_ = 0;
cc::LayerTreeSettings settings;
settings.refresh_rate = 60.0;
@@ -415,8 +417,6 @@
command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
settings.initial_debug_state.show_fps_counter =
command_line->HasSwitch(cc::switches::kUIShowFPSCounter);
- // TODO(enne): Update this this compositor to use the scheduler.
- settings.single_thread_proxy_scheduler = false;
host_ = cc::LayerTreeHost::CreateSingleThreaded(
this, this, HostSharedBitmapManager::current(), settings);
@@ -495,9 +495,10 @@
}
void CompositorImpl::Layout() {
- ignore_schedule_composite_ = true;
+ // TODO: If we get this callback from the SingleThreadProxy, we need
+ // to stop calling it ourselves in CompositorImpl::Composite().
+ NOTREACHED();
client_->Layout();
- ignore_schedule_composite_ = false;
}
scoped_ptr<cc::OutputSurface> CompositorImpl::CreateOutputSurface(
@@ -546,6 +547,7 @@
}
void CompositorImpl::ScheduleAnimation() {
+ DCHECK(!needs_animate_ || needs_composite_);
DCHECK(!needs_composite_ || WillComposite());
needs_animate_ = true;
@@ -575,7 +577,6 @@
// This really gets called only once from
// SingleThreadProxy::DidLoseOutputSurfaceOnImplThread() when the
// context was lost.
- ScheduleComposite();
client_->OnSwapBuffersCompleted(0);
}
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | content/renderer/gpu/render_widget_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698