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

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

Issue 2573603005: Compute damage rect for Cast video compositing (Closed)
Patch Set: Created 4 years 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 53b6304db3577834f2270fdfc04d1900c71665d1..a1dbeaff3199d00adbddbc7cdf3c919624312152 100644
--- a/content/browser/compositor/gpu_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/gpu_browser_compositor_output_surface.cc
@@ -105,7 +105,10 @@ void GpuBrowserCompositorOutputSurface::SwapBuffers(
}
}
- if (swap_rect == gfx::Rect(frame.size))
+ if (frame.swap_with_damage_rect != gfx::Rect(frame.size))
+ context_provider_->ContextSupport()->SwapWithDamage(
+ frame.swap_with_damage_rect);
+ else if (swap_rect == gfx::Rect(frame.size))
context_provider_->ContextSupport()->Swap();
else
context_provider_->ContextSupport()->PartialSwapBuffers(swap_rect);

Powered by Google App Engine
This is Rietveld 408576698