| Index: Source/platform/graphics/gpu/DrawingBuffer.h
|
| diff --git a/Source/platform/graphics/gpu/DrawingBuffer.h b/Source/platform/graphics/gpu/DrawingBuffer.h
|
| index 1cd75dfbb4693140b19c8a0d4b3c76af953843fd..8b8748c19fdde5415e5485bfdfc6ddc03e8e899a 100644
|
| --- a/Source/platform/graphics/gpu/DrawingBuffer.h
|
| +++ b/Source/platform/graphics/gpu/DrawingBuffer.h
|
| @@ -79,24 +79,19 @@ public:
|
| Discard
|
| };
|
|
|
| - static PassRefPtr<DrawingBuffer> create(blink::WebGraphicsContext3D*, const IntSize&, PreserveDrawingBuffer, PassRefPtr<ContextEvictionManager>);
|
| + static PassRefPtr<DrawingBuffer> create(PassOwnPtr<blink::WebGraphicsContext3D>, const IntSize&, PreserveDrawingBuffer, PassRefPtr<ContextEvictionManager>);
|
|
|
| virtual ~DrawingBuffer();
|
|
|
| - // Clear all resources from this object, as well as context. Called when context is destroyed
|
| - // to prevent invalid accesses to the resources.
|
| - void releaseResources();
|
| -
|
| // 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);
|
|
|
| // Given the desired buffer size, provides the largest dimensions that will fit in the pixel budget.
|
| IntSize adjustSize(const IntSize&);
|
| - void reset(const IntSize&);
|
| + bool reset(const IntSize&);
|
| void bind();
|
| IntSize size() const { return m_size; }
|
| - bool isZeroSized() const { return m_size.isEmpty(); }
|
|
|
| // Copies the multisample color buffer to the normal color buffer and leaves m_fbo bound.
|
| void commit(long x = 0, long y = 0, long width = -1, long height = -1);
|
| @@ -143,10 +138,11 @@ public:
|
| PassRefPtr<Uint8ClampedArray> paintRenderingResultsToImageData(int&, int&);
|
|
|
| private:
|
| - DrawingBuffer(blink::WebGraphicsContext3D*, const IntSize&, bool multisampleExtensionSupported,
|
| + DrawingBuffer(PassOwnPtr<blink::WebGraphicsContext3D>, bool multisampleExtensionSupported,
|
| bool packedDepthStencilExtensionSupported, PreserveDrawingBuffer, PassRefPtr<ContextEvictionManager>);
|
|
|
| - void initialize(const IntSize&);
|
| + bool initialize(const IntSize&);
|
| + void releaseResources();
|
|
|
| unsigned createColorTexture(const IntSize& size = IntSize());
|
| // Create the depth/stencil and multisample buffers, if needed.
|
| @@ -198,7 +194,7 @@ private:
|
| Platform3DObject m_framebufferBinding;
|
| GLenum m_activeTextureUnit;
|
|
|
| - blink::WebGraphicsContext3D* m_context;
|
| + OwnPtr<blink::WebGraphicsContext3D> m_context;
|
| IntSize m_size;
|
| bool m_multisampleExtensionSupported;
|
| bool m_packedDepthStencilExtensionSupported;
|
|
|