diff options
author | Nicolas Roard <nicolas@android.com> | 2011-01-26 14:46:30 -0800 |
---|---|---|
committer | Nicolas Roard <nicolas@android.com> | 2011-01-26 14:46:30 -0800 |
commit | 4c0f1a51d7d3b51a1f241aa700f9ed5b3b23998c (patch) | |
tree | b43179d9105c4e5e6c968662f99eb0e5fa48b1e6 /WebCore/platform/graphics/android/LayerTexture.h | |
parent | ed03e47015ce173c535ea9da8b61548db718e80e (diff) | |
download | external_webkit-4c0f1a51d7d3b51a1f241aa700f9ed5b3b23998c.zip external_webkit-4c0f1a51d7d3b51a1f241aa700f9ed5b3b23998c.tar.gz external_webkit-4c0f1a51d7d3b51a1f241aa700f9ed5b3b23998c.tar.bz2 |
Fix the flickering bug. We return any previous textures used by the
layer until we get the new one ready.
bug:3391157 bug:3393571
Change-Id: I81dce23f79be788c3c0bfb0ccfd54d08156dfe3f
Diffstat (limited to 'WebCore/platform/graphics/android/LayerTexture.h')
-rw-r--r-- | WebCore/platform/graphics/android/LayerTexture.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/WebCore/platform/graphics/android/LayerTexture.h b/WebCore/platform/graphics/android/LayerTexture.h index fb1b9fb..042422d 100644 --- a/WebCore/platform/graphics/android/LayerTexture.h +++ b/WebCore/platform/graphics/android/LayerTexture.h @@ -38,15 +38,22 @@ class LayerTexture : public BackedDoubleBufferedTexture { : BackedDoubleBufferedTexture(w, h, config) , m_id(0) , m_scale(1) - , m_pictureUsed(-1) + , m_pictureUsed(0) + , m_ready(false) {} virtual ~LayerTexture() {}; int id() { return m_id; } void setId(int id) { m_id = id; } + bool ready() { return m_ready; } unsigned int pictureUsed() { return m_pictureUsed; } - void setPictureUsed(unsigned pictureUsed) { m_pictureUsed = pictureUsed; } + void setPictureUsed(unsigned pictureUsed) + { + if (!m_ready) + m_ready = true; + m_pictureUsed = pictureUsed; + } void setRect(const IntRect& r) { m_rect = r; } IntRect& rect() { return m_rect; } float scale() { return m_scale; } @@ -58,6 +65,7 @@ class LayerTexture : public BackedDoubleBufferedTexture { IntRect m_rect; float m_scale; unsigned int m_pictureUsed; + bool m_ready; }; } // namespace WebCore |