summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/MediaTexture.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/android/MediaTexture.h')
-rw-r--r--WebCore/platform/graphics/android/MediaTexture.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/WebCore/platform/graphics/android/MediaTexture.h b/WebCore/platform/graphics/android/MediaTexture.h
index b0c04a6..722afd8 100644
--- a/WebCore/platform/graphics/android/MediaTexture.h
+++ b/WebCore/platform/graphics/android/MediaTexture.h
@@ -33,11 +33,23 @@ namespace WebCore {
class VideoListener;
-class MediaTexture : public DoubleBufferedTexture,
- public android::LightRefBase<MediaTexture> {
+class MediaTexture : public DoubleBufferedTexture {
public:
- MediaTexture(EGLContext sharedContext) : DoubleBufferedTexture(sharedContext) { };
+ MediaTexture(EGLContext sharedContext);
+
+ void producerInc();
+ void producerDec();
+ void consumerInc();
+ void consumerDec();
+
+ int getProducerCount() { android::Mutex::Autolock lock(m_mediaLock); return m_producerRefCount; }
+ int getConsumerCount() { android::Mutex::Autolock lock(m_mediaLock); return m_consumerRefCount; }
+
+private:
+ android::Mutex m_mediaLock;
+ int m_producerRefCount;
+ int m_consumerRefCount;
};
class VideoTexture : public android::LightRefBase<VideoTexture> {