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

Unified Diff: cc/output/direct_renderer.cc

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Rebased to resolve conflict. 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
« no previous file with comments | « cc/layers/render_surface_impl.cc ('k') | cc/quads/render_pass.h » ('j') | 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 3dba198b5be97829c1b6eec8c9ef1a5f55d25822..57ee33ac8679da91ffa83afbc2850c0180ef8700 100644
--- a/cc/output/direct_renderer.cc
+++ b/cc/output/direct_renderer.cc
@@ -628,6 +628,14 @@ bool DirectRenderer::UseRenderPass(const RenderPass* render_pass) {
}
DCHECK(texture->id());
+ if (render_pass->cache_render_pass &&
+ !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()),
« no previous file with comments | « cc/layers/render_surface_impl.cc ('k') | cc/quads/render_pass.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698