diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-03 17:29:39 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-03 17:29:39 +0000 |
commit | c1f807d2f3fe19c2a66f41d600c4387c8cf8e763 (patch) | |
tree | 819b17a738b67ec8c7168f8635ab35d974707ee1 /cc | |
parent | 197f4200b22d71ae435197cca5b7c2da7b146e27 (diff) | |
download | chromium_src-c1f807d2f3fe19c2a66f41d600c4387c8cf8e763.zip chromium_src-c1f807d2f3fe19c2a66f41d600c4387c8cf8e763.tar.gz chromium_src-c1f807d2f3fe19c2a66f41d600c4387c8cf8e763.tar.bz2 |
cc: Make the HUD allocate a new texture when the current one is in use by the parent compositor.
We could make the HUD double buffer and swap between two textures, but this is
maybe a bit overkill.
BUG=123444
Review URL: https://chromiumcodereview.appspot.com/11748008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174975 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r-- | cc/heads_up_display_layer_impl.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cc/heads_up_display_layer_impl.cc b/cc/heads_up_display_layer_impl.cc index 73f99d0..177f349 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()) |