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 1d65415c2f4de51dc5aaa7dc9afce98a507f7568..5472ad29d74e5eba1817893aaae745e83676b79b 100644 |
--- a/content/browser/compositor/gpu_browser_compositor_output_surface.cc |
+++ b/content/browser/compositor/gpu_browser_compositor_output_surface.cc |
@@ -105,6 +105,8 @@ void GpuBrowserCompositorOutputSurface::SwapBuffers( |
} |
} |
+ set_draw_rectangle_for_frame_ = false; |
+ |
if (swap_rect == gfx::Rect(frame.size)) |
context_provider_->ContextSupport()->Swap(); |
else |
@@ -133,6 +135,15 @@ void GpuBrowserCompositorOutputSurface::SetSurfaceSuspendedForRecycle( |
bool suspended) {} |
#endif |
+void GpuBrowserCompositorOutputSurface::SetDrawRectangle( |
+ const gfx::Rect& rect) { |
+ if (set_draw_rectangle_for_frame_) |
sunnyps
2017/01/28 01:33:58
should we dcheck/check(!set_draw_rectangle_for_fra
sunnyps
2017/01/28 01:33:58
can we dcheck/check that rect is a subrect of surf
|
+ return; |
+ set_draw_rectangle_for_frame_ = true; |
+ context_provider()->ContextGL()->SetDrawRectangleCHROMIUM( |
+ rect.x(), rect.y(), rect.width(), rect.height()); |
+} |
+ |
gpu::CommandBufferProxyImpl* |
GpuBrowserCompositorOutputSurface::GetCommandBufferProxy() { |
ui::ContextProviderCommandBuffer* provider_command_buffer = |