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

Unified Diff: cc/direct_renderer.cc

Issue 11420079: Allow using a larger-than-necessary texture as cached render pass backing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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/direct_renderer.cc
diff --git a/cc/direct_renderer.cc b/cc/direct_renderer.cc
index c0efca4eb45aa6953e30841350389d88ab647914..aba56144849c815b18cae77e6833bd3a7e3711c2 100644
--- a/cc/direct_renderer.cc
+++ b/cc/direct_renderer.cc
@@ -135,7 +135,9 @@ void DirectRenderer::decideRenderPassAllocationsForFrame(const RenderPassList& r
CachedResource* texture = passIterator->second;
DCHECK(texture);
- if (texture->id() && (texture->size() != requiredSize || texture->format() != requiredFormat))
+ bool sizeAppropriate = texture->size().width() >= requiredSize.width() &&
+ texture->size().height() >= requiredSize.height();
+ if (texture->id() && (!sizeAppropriate || texture->format() != requiredFormat))
danakj 2012/11/20 00:26:33 I'm worried about the texture cacheing code. It ma
danakj 2012/11/20 00:36:41 Is it true that in order for the size of the rende
enne (OOO) 2012/11/20 00:39:45 Yeah, I think contentsChangedSinceLastFrame will c
danakj 2012/11/20 00:41:36 Ya, Okay I've convinced myself that we'll be alrig
texture->Free();
}
« 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