Passing alpha to DeferredImageDecoder once decoding completes
[WebKit-https.git] / Source / WebCore / platform / graphics / chromium / ImageFrameGenerator.h
index 550a07025fb0333828f8e39c102751e2e78eb6d0..343e7b51ec6d40b0c7a0a1586c68966dbb410b73 100644 (file)
@@ -67,6 +67,8 @@ public:
 
     void setImageDecoderFactoryForTesting(PassOwnPtr<ImageDecoderFactory> factory) { m_imageDecoderFactory = factory; }
 
+    bool hasAlpha();
+
 private:
     // These methods are called while m_decodeMutex is locked.
     const ScaledImageFragment* tryToLockCompleteCache(const SkISize& scaledSize);
@@ -80,12 +82,16 @@ private:
     SkISize m_fullSize;
     ThreadSafeDataTransport m_data;
     bool m_decodeFailedAndEmpty;
+    bool m_hasAlpha;
     DiscardablePixelRefAllocator m_allocator;
 
     OwnPtr<ImageDecoderFactory> m_imageDecoderFactory;
 
     // Prevents multiple decode operations on the same data.
     Mutex m_decodeMutex;
+
+    // Protect concurrent access to m_hasAlpha.
+    Mutex m_alphaMutex;
 };
 
 } // namespace WebCore