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

Unified Diff: cc/output/direct_renderer.cc

Issue 1413763013: Avoid rendering using GL in case damage rect is composited by overlay (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/direct_renderer.cc
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc
index 1be41e9216244f7695506283ce4779778e768c79..3d2c2e417a3dc567d9b3a519b77d790d3a87afea 100644
--- a/cc/output/direct_renderer.cc
+++ b/cc/output/direct_renderer.cc
@@ -239,8 +239,18 @@ void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order,
// If we have any copy requests, we can't remove any quads for overlays,
// otherwise the framebuffer will be missing the overlay contents.
if (root_render_pass->copy_requests.empty()) {
+ bool needs_rendering = !frame.root_damage_rect.IsEmpty();
overlay_processor_->ProcessForOverlays(
resource_provider_, render_passes_in_draw_order, &frame.overlay_list);
+
+ // No need to render in case the damage rect is completely composited using
+ // overlays.
+ if (needs_rendering && frame.root_damage_rect.IsEmpty()) {
piman 2015/10/26 17:53:40 Why the test for needs_rendering here? Why would w
kalyank 2015/10/27 06:09:33 Ya this wasn't needed, Fixed it. Added checks to m
+ BindFramebufferToOutputSurface(&frame);
+ FinishDrawingFrame(&frame);
+ render_passes_in_draw_order->clear();
+ return;
+ }
}
for (size_t i = 0; i < render_passes_in_draw_order->size(); ++i) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698