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

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

Issue 134623005: Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac browser compositor fixes Created 6 years, 5 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/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 3a22c20ffac2df45fbac7e692fb3a7cf76c0a519..502e105cf6a7837e3db07107f57a7fb38af49f69 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -314,7 +314,6 @@ void CompositorImpl::Composite(CompositingTrigger trigger) {
// 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_) {
@@ -407,7 +406,6 @@ void CompositorImpl::SetVisible(bool visible) {
} else if (!host_) {
DCHECK(!WillComposite());
needs_composite_ = false;
- needs_animate_ = false;
pending_swapbuffers_ = 0;
cc::LayerTreeSettings settings;
settings.refresh_rate = 60.0;
@@ -422,6 +420,8 @@ void CompositorImpl::SetVisible(bool visible) {
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,
@@ -504,10 +504,9 @@ CreateGpuProcessViewContext(
}
void CompositorImpl::Layout() {
- // TODO: If we get this callback from the SingleThreadProxy, we need
- // to stop calling it ourselves in CompositorImpl::Composite().
- NOTREACHED();
+ ignore_schedule_composite_ = true;
client_->Layout();
+ ignore_schedule_composite_ = false;
}
scoped_ptr<cc::OutputSurface> CompositorImpl::CreateOutputSurface(
@@ -556,7 +555,6 @@ void CompositorImpl::ScheduleComposite() {
}
void CompositorImpl::ScheduleAnimation() {
- DCHECK(!needs_animate_ || needs_composite_);
DCHECK(!needs_composite_ || WillComposite());
needs_animate_ = true;
@@ -586,6 +584,7 @@ void CompositorImpl::DidAbortSwapBuffers() {
// This really gets called only once from
// SingleThreadProxy::DidLoseOutputSurfaceOnImplThread() when the
// context was lost.
+ ScheduleComposite();
client_->OnSwapBuffersCompleted(0);
}

Powered by Google App Engine
This is Rietveld 408576698