 Chromium Code Reviews
 Chromium Code Reviews Issue 163773007:
  WebGL: Transfer ownership of WebGraphicsContext3D from WebGLRenderingContext to DrawingBuffer.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@correct_webgl_destroy
    
  
    Issue 163773007:
  WebGL: Transfer ownership of WebGraphicsContext3D from WebGLRenderingContext to DrawingBuffer.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@correct_webgl_destroy| Index: Source/web/tests/DrawingBufferTest.cpp | 
| diff --git a/Source/web/tests/DrawingBufferTest.cpp b/Source/web/tests/DrawingBufferTest.cpp | 
| index 0d0ac8f9a207533abcd9e65ec087f9b26f8f9476..1ecffbd4dfcc672c1ad764d74364414e2580ecdf 100644 | 
| --- a/Source/web/tests/DrawingBufferTest.cpp | 
| +++ b/Source/web/tests/DrawingBufferTest.cpp | 
| @@ -112,16 +112,17 @@ protected: | 
| virtual void SetUp() | 
| { | 
| RefPtr<FakeContextEvictionManager> contextEvictionManager = adoptRef(new FakeContextEvictionManager()); | 
| - m_context = adoptPtr(new WebGraphicsContext3DForTests); | 
| - m_drawingBuffer = DrawingBuffer::create(m_context.get(), IntSize(initialWidth, initialHeight), DrawingBuffer::Preserve, contextEvictionManager.release()); | 
| + OwnPtr<WebGraphicsContext3DForTests> context = adoptPtr(new WebGraphicsContext3DForTests); | 
| + m_context = context.get(); | 
| + m_drawingBuffer = DrawingBuffer::create(context.release(), IntSize(initialWidth, initialHeight), DrawingBuffer::Preserve, contextEvictionManager.release()); | 
| } | 
| WebGraphicsContext3DForTests* webContext() | 
| { | 
| - return m_context.get(); | 
| + return m_context; | 
| } | 
| - OwnPtr<WebGraphicsContext3DForTests> m_context; | 
| + WebGraphicsContext3DForTests* m_context; | 
| RefPtr<DrawingBuffer> m_drawingBuffer; | 
| }; | 
| @@ -141,16 +142,6 @@ TEST_F(DrawingBufferTest, testPaintRenderingResultsToCanvas) | 
| EXPECT_FALSE(imageBuffer->bitmap().isNull()); | 
| } | 
| -TEST_F(DrawingBufferTest, verifyNoNewBuffersAfterContextLostWithMailboxes) | 
| 
Ken Russell (switch to Gerrit)
2014/02/27 22:49:09
Why was this test removed? Is this just a mistake
 | 
| -{ | 
| - // Tell the buffer its contents changed and context was lost. | 
| - m_drawingBuffer->markContentsChanged(); | 
| - m_drawingBuffer->releaseResources(); | 
| - | 
| - blink::WebExternalTextureMailbox mailbox; | 
| - EXPECT_FALSE(m_drawingBuffer->prepareMailbox(&mailbox, 0)); | 
| -} | 
| - | 
| TEST_F(DrawingBufferTest, verifyResizingProperlyAffectsMailboxes) | 
| { | 
| blink::WebExternalTextureMailbox mailbox; |