summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/BackedDoubleBufferedTexture.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/android/BackedDoubleBufferedTexture.h')
-rw-r--r--WebCore/platform/graphics/android/BackedDoubleBufferedTexture.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/BackedDoubleBufferedTexture.h b/WebCore/platform/graphics/android/BackedDoubleBufferedTexture.h
index 1c50d87..b1f170b 100644
--- a/WebCore/platform/graphics/android/BackedDoubleBufferedTexture.h
+++ b/WebCore/platform/graphics/android/BackedDoubleBufferedTexture.h
@@ -68,7 +68,7 @@ public:
// allows consumer thread to assign ownership of the texture to the tile. It
// returns false if ownership cannot be transferred because the tile is busy
bool acquire(TextureOwner* owner);
- void release(TextureOwner* owner);
+ bool release(TextureOwner* owner);
// set the texture owner if not busy. Return false if busy, true otherwise.
bool setOwner(TextureOwner* owner);
@@ -78,6 +78,7 @@ public:
SkCanvas* canvas(); // only used by the producer thread
bool busy();
+ void setNotBusy();
const SkSize& getSize() const { return m_size; }
@@ -98,6 +99,12 @@ private:
SkBitmap::Config m_config;
TextureOwner* m_owner;
+ // When trying to release a texture, we may delay this if the texture is
+ // currently used (busy being painted). We use the following two variables
+ // to do so in setNotBusy()
+ TextureOwner* m_delayedReleaseOwner;
+ bool m_delayedRelease;
+
// This values signals that the texture is currently in use by the consumer.
// This allows us to prevent the owner of the texture from changing while the
// consumer is holding a lock on the texture.