Chromium Code Reviews| Index: content/browser/android/in_process/synchronous_compositor_output_surface.cc |
| diff --git a/content/browser/android/in_process/synchronous_compositor_output_surface.cc b/content/browser/android/in_process/synchronous_compositor_output_surface.cc |
| index 7b8464b81a0f29f164a9321af6c1e75730e0a525..62a8840abd4dcdf626c3808faa36808cc3fd46ec 100644 |
| --- a/content/browser/android/in_process/synchronous_compositor_output_surface.cc |
| +++ b/content/browser/android/in_process/synchronous_compositor_output_surface.cc |
| @@ -6,7 +6,6 @@ |
| #include "base/auto_reset.h" |
| #include "base/logging.h" |
| -#include "cc/output/begin_frame_args.h" |
| #include "cc/output/compositor_frame.h" |
| #include "cc/output/context_provider.h" |
| #include "cc/output/output_surface_client.h" |
| @@ -73,8 +72,6 @@ SynchronousCompositorOutputSurface::SynchronousCompositorOutputSurface( |
| : cc::OutputSurface( |
| scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareDevice(this))), |
| routing_id_(routing_id), |
| - needs_begin_frame_(false), |
| - invoking_composite_(false), |
| current_sw_canvas_(NULL), |
| memory_policy_(0), |
| output_surface_client_(NULL), |
| @@ -121,14 +118,6 @@ void SynchronousCompositorOutputSurface::Reshape( |
| // Intentional no-op: surface size is controlled by the embedder. |
| } |
| -void SynchronousCompositorOutputSurface::SetNeedsBeginFrame(bool enable) { |
| - DCHECK(CalledOnValidThread()); |
| - needs_begin_frame_ = enable; |
| - SynchronousCompositorOutputSurfaceDelegate* delegate = GetDelegate(); |
| - if (delegate && !invoking_composite_) |
| - delegate->SetContinuousInvalidate(needs_begin_frame_); |
| -} |
| - |
| void SynchronousCompositorOutputSurface::SwapBuffers( |
| cc::CompositorFrame* frame) { |
| DCHECK(CalledOnValidThread()); |
| @@ -220,9 +209,7 @@ void SynchronousCompositorOutputSurface::InvokeComposite( |
| gfx::Rect viewport_rect_for_tile_priority, |
| gfx::Transform transform_for_tile_priority, |
| bool hardware_draw) { |
| - DCHECK(!invoking_composite_); |
| DCHECK(!frame_holder_.get()); |
| - base::AutoReset<bool> invoking_composite_resetter(&invoking_composite_, true); |
| gfx::Transform adjusted_transform = transform; |
| AdjustTransform(&adjusted_transform, viewport); |
| @@ -233,7 +220,10 @@ void SynchronousCompositorOutputSurface::InvokeComposite( |
| transform_for_tile_priority, |
| !hardware_draw); |
| SetNeedsRedrawRect(gfx::Rect(viewport.size())); |
| - client_->BeginFrame(cc::BeginFrameArgs::CreateForSynchronousCompositor()); |
| + |
| + SynchronousCompositorOutputSurfaceDelegate* delegate = GetDelegate(); |
| + if (delegate) |
| + delegate->RequestBeginFrame(); |
|
boliu
2014/10/24 17:42:41
Calling through to BeginFrameSource is super awkwa
simonhong
2014/10/29 14:47:13
Yes, I understood your meaning.
Requesting to comp
|
| // After software draws (which might move the viewport arbitrarily), restore |
| // the previous hardware viewport to allow CC's tile manager to prioritize |
| @@ -257,10 +247,6 @@ void SynchronousCompositorOutputSurface::InvokeComposite( |
| if (frame_holder_.get()) |
| client_->DidSwapBuffersComplete(); |
| - |
| - SynchronousCompositorOutputSurfaceDelegate* delegate = GetDelegate(); |
| - if (delegate) |
| - delegate->SetContinuousInvalidate(needs_begin_frame_); |
| } |
| void SynchronousCompositorOutputSurface::ReturnResources( |