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

Unified Diff: cc/heads_up_display_layer_impl.cc

Issue 11622008: cc: Defer texture allocation (to allow async allocations). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix remaining tests. Created 8 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
« no previous file with comments | « no previous file | cc/layer_tree_host_impl_unittest.cc » ('j') | cc/resource_provider.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/heads_up_display_layer_impl.cc
diff --git a/cc/heads_up_display_layer_impl.cc b/cc/heads_up_display_layer_impl.cc
index 73f99d01c29be4b3c317390d9e4c0331ff8fe6ee..e10e9242669fade954f9e7ec24bd5e1208cb892e 100644
--- a/cc/heads_up_display_layer_impl.cc
+++ b/cc/heads_up_display_layer_impl.cc
@@ -76,8 +76,13 @@ void HeadsUpDisplayLayerImpl::willDraw(ResourceProvider* resourceProvider)
if (m_hudTexture->size() != bounds())
m_hudTexture->Free();
- if (!m_hudTexture->id())
+ if (!m_hudTexture->id()) {
m_hudTexture->Allocate(bounds(), GL_RGBA, ResourceProvider::TextureUsageAny);
+ // TODO(epenner): This texture was being used before setPixels was called,
piman 2012/12/19 00:45:49 nit: file a bug to clean up? It sounds like the a
+ // which is now not allowed (it's an uninitialized read). This should be fixed
+ // and this allocateForTesting() removed.
+ resourceProvider->allocateForTesting(m_hudTexture->id());
+ }
}
void HeadsUpDisplayLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQuadsData)
« no previous file with comments | « no previous file | cc/layer_tree_host_impl_unittest.cc » ('j') | cc/resource_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698