| Index: content/browser/compositor/gpu_browser_compositor_output_surface.cc
|
| diff --git a/content/browser/compositor/gpu_browser_compositor_output_surface.cc b/content/browser/compositor/gpu_browser_compositor_output_surface.cc
|
| index f0184f56bb33c50e00576ebe0258ee100abc4c16..143a9b7fd8ecac6e5e097b46f89112dad564d787 100644
|
| --- a/content/browser/compositor/gpu_browser_compositor_output_surface.cc
|
| +++ b/content/browser/compositor/gpu_browser_compositor_output_surface.cc
|
| @@ -90,6 +90,8 @@ void GpuBrowserCompositorOutputSurface::Reshape(
|
| const gfx::ColorSpace& color_space,
|
| bool has_alpha,
|
| bool use_stencil) {
|
| + size_ = size;
|
| + has_set_draw_rectangle_ = false;
|
| context_provider()->ContextGL()->ResizeCHROMIUM(
|
| size.width(), size.height(), device_scale_factor, has_alpha);
|
| }
|
| @@ -110,6 +112,8 @@ void GpuBrowserCompositorOutputSurface::SwapBuffers(
|
| }
|
| }
|
|
|
| + set_draw_rectangle_for_frame_ = false;
|
| +
|
| if (swap_rect == gfx::Rect(frame.size))
|
| context_provider_->ContextSupport()->Swap();
|
| else
|
| @@ -138,6 +142,18 @@ void GpuBrowserCompositorOutputSurface::SetSurfaceSuspendedForRecycle(
|
| bool suspended) {}
|
| #endif
|
|
|
| +void GpuBrowserCompositorOutputSurface::SetDrawRectangle(
|
| + const gfx::Rect& rect) {
|
| + if (set_draw_rectangle_for_frame_)
|
| + return;
|
| + DCHECK(gfx::Rect(size_).Contains(rect));
|
| + DCHECK(has_set_draw_rectangle_ || (gfx::Rect(size_) == rect));
|
| + set_draw_rectangle_for_frame_ = true;
|
| + has_set_draw_rectangle_ = true;
|
| + context_provider()->ContextGL()->SetDrawRectangleCHROMIUM(
|
| + rect.x(), rect.y(), rect.width(), rect.height());
|
| +}
|
| +
|
| gpu::CommandBufferProxyImpl*
|
| GpuBrowserCompositorOutputSurface::GetCommandBufferProxy() {
|
| ui::ContextProviderCommandBuffer* provider_command_buffer =
|
|
|