| 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 041de4ddfec0fa4b45229aae5285b0ebc7881636..30e4dd0d7e6c90b329514f086839d01583b69786 100644
|
| --- a/content/browser/android/in_process/synchronous_compositor_output_surface.cc
|
| +++ b/content/browser/android/in_process/synchronous_compositor_output_surface.cc
|
| @@ -95,14 +95,6 @@ SynchronousCompositorOutputSurface::~SynchronousCompositorOutputSurface() {
|
| delegate->DidDestroySynchronousOutputSurface(this);
|
| }
|
|
|
| -bool SynchronousCompositorOutputSurface::ForcedDrawToSoftwareDevice() const {
|
| - // |current_sw_canvas_| indicates we're in a DemandDrawSw call. In addition
|
| - // |invoking_composite_| == false indicates an attempt to draw outside of
|
| - // the synchronous compositor's control: force it into SW path and hence to
|
| - // the null canvas (and will log a warning there).
|
| - return current_sw_canvas_ != NULL || !invoking_composite_;
|
| -}
|
| -
|
| bool SynchronousCompositorOutputSurface::BindToClient(
|
| cc::OutputSurfaceClient* surface_client) {
|
| DCHECK(CalledOnValidThread());
|
| @@ -207,7 +199,7 @@ void SynchronousCompositorOutputSurface::InvokeComposite(
|
| const gfx::Transform& transform,
|
| gfx::Rect viewport,
|
| gfx::Rect clip,
|
| - bool valid_for_tile_management) {
|
| + bool hardware_draw) {
|
| DCHECK(!invoking_composite_);
|
| DCHECK(!frame_holder_.get());
|
| base::AutoReset<bool> invoking_composite_resetter(&invoking_composite_, true);
|
| @@ -215,20 +207,23 @@ void SynchronousCompositorOutputSurface::InvokeComposite(
|
| gfx::Transform adjusted_transform = transform;
|
| AdjustTransform(&adjusted_transform, viewport);
|
| SetExternalDrawConstraints(
|
| - adjusted_transform, viewport, clip, valid_for_tile_management);
|
| + adjusted_transform, viewport, clip, !hardware_draw, hardware_draw);
|
| SetNeedsRedrawRect(gfx::Rect(viewport.size()));
|
| client_->BeginFrame(cc::BeginFrameArgs::CreateForSynchronousCompositor());
|
|
|
| // After software draws (which might move the viewport arbitrarily), restore
|
| // the previous hardware viewport to allow CC's tile manager to prioritize
|
| // properly.
|
| - if (valid_for_tile_management) {
|
| + if (hardware_draw) {
|
| cached_hw_transform_ = adjusted_transform;
|
| cached_hw_viewport_ = viewport;
|
| cached_hw_clip_ = clip;
|
| } else {
|
| - SetExternalDrawConstraints(
|
| - cached_hw_transform_, cached_hw_viewport_, cached_hw_clip_, true);
|
| + SetExternalDrawConstraints(cached_hw_transform_,
|
| + cached_hw_viewport_,
|
| + cached_hw_clip_,
|
| + false,
|
| + true);
|
| }
|
|
|
| if (frame_holder_.get())
|
|
|