Index: Source/platform/graphics/gpu/DrawingBuffer.h |
diff --git a/Source/platform/graphics/gpu/DrawingBuffer.h b/Source/platform/graphics/gpu/DrawingBuffer.h |
index b74f4cf2fbb0ebd5241016bf5986b8ea396a1b68..66c397021d0fc43fd4f700c0e5b29a53b9ff7456 100644 |
--- a/Source/platform/graphics/gpu/DrawingBuffer.h |
+++ b/Source/platform/graphics/gpu/DrawingBuffer.h |
@@ -72,6 +72,7 @@ class PLATFORM_EXPORT DrawingBuffer : public RefCounted<DrawingBuffer>, public b |
blink::WebExternalTextureMailbox mailbox; |
unsigned textureId; |
IntSize size; |
+ RefPtr<DrawingBuffer> m_parentDrawingBuffer; |
Ken Russell (switch to Gerrit)
2014/04/15 02:24:02
Please document the semantics.
"This keeps the pa
|
}; |
public: |
enum PreserveDrawingBuffer { |
@@ -83,6 +84,9 @@ public: |
virtual ~DrawingBuffer(); |
+ // Destruction will be completed after all mailboxes are received. |
Ken Russell (switch to Gerrit)
2014/04/15 02:24:02
received -> released
|
+ void beginDestruction(); |
+ |
// Issues a glClear() on all framebuffers associated with this DrawingBuffer. The caller is responsible for |
// making the context current and setting the clear values and masks. Modifies the framebuffer binding. |
void clearFramebuffers(GLbitfield clearMask); |
@@ -138,12 +142,14 @@ public: |
void paintRenderingResultsToCanvas(ImageBuffer*); |
PassRefPtr<Uint8ClampedArray> paintRenderingResultsToImageData(int&, int&); |
-private: |
+protected: // For unittests |
DrawingBuffer(PassOwnPtr<blink::WebGraphicsContext3D>, bool multisampleExtensionSupported, |
bool packedDepthStencilExtensionSupported, PreserveDrawingBuffer, PassRefPtr<ContextEvictionManager>); |
bool initialize(const IntSize&); |
- void releaseResources(); |
+ |
+private: |
+ void mailboxReleasedInDestructionInProgress(const blink::WebExternalTextureMailbox&); |
Ken Russell (switch to Gerrit)
2014/04/15 02:24:02
Please rename this to "mailboxReleasedWhileDestruc
|
unsigned createColorTexture(const IntSize& size = IntSize()); |
// Create the depth/stencil and multisample buffers, if needed. |
@@ -237,6 +243,7 @@ private: |
int m_maxTextureSize; |
int m_sampleCount; |
int m_packAlignment; |
+ bool m_destructionInProgress; |
OwnPtr<blink::WebExternalTextureLayer> m_layer; |