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

Unified Diff: content/browser/compositor/gpu_browser_compositor_output_surface.cc

Issue 2646243002: Use IDCompositionSurface to implement DirectCompositionSurfaceWin. (Closed)
Patch Set: more changes Created 3 years, 11 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/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 =

Powered by Google App Engine
This is Rietveld 408576698