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

Unified Diff: cc/output/direct_renderer.cc

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Reduce unneeded code in surface aggregator and add more test. Created 3 years, 5 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: cc/output/direct_renderer.cc
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc
index b97dec844b74a91eda2f5a96c5dce6fe0e246cb0..c1683683e53e6e17fc84112d25f09826d0491564 100644
--- a/cc/output/direct_renderer.cc
+++ b/cc/output/direct_renderer.cc
@@ -627,6 +627,14 @@ bool DirectRenderer::UseRenderPass(const RenderPass* render_pass) {
}
DCHECK(texture->id());
+ if (render_pass->cache_render_surface &&
+ !render_pass->has_damage_from_contributing_content) {
+ return false;
+ }
+
+ if (current_frame()->ComputeScissorRectForRenderPass().IsEmpty())
+ return false;
+
if (BindFramebufferToTexture(texture)) {
InitializeViewport(current_frame(), render_pass->output_rect,
gfx::Rect(render_pass->output_rect.size()),

Powered by Google App Engine
This is Rietveld 408576698