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

Unified Diff: cc/heads_up_display_layer_impl.cc

Issue 11748008: cc: Make the HUD allocate a new texture when the current one is in use by the parent compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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/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..177f349558981a9a7d302b80ad99d555fb2c584b 100644
--- a/cc/heads_up_display_layer_impl.cc
+++ b/cc/heads_up_display_layer_impl.cc
@@ -71,9 +71,10 @@ void HeadsUpDisplayLayerImpl::willDraw(ResourceProvider* resourceProvider)
if (!m_hudTexture)
m_hudTexture = ScopedResource::create(resourceProvider);
- // FIXME: Scale the HUD by deviceScale to make it more friendly under high DPI.
+ // TODO(danakj): Scale the HUD by deviceScale to make it more friendly under high DPI.
- if (m_hudTexture->size() != bounds())
+ // TODO(danakj): The HUD could swap between two textures instead of creating a texture every frame in ubercompositor.
+ if (m_hudTexture->size() != bounds() || resourceProvider->inUseByConsumer(m_hudTexture->id()))
m_hudTexture->Free();
if (!m_hudTexture->id())
« 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