Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Unified Diff: Source/web/tests/DrawingBufferTest.cpp

Issue 163773007: WebGL: Transfer ownership of WebGraphicsContext3D from WebGLRenderingContext to DrawingBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@correct_webgl_destroy
Patch Set: Rebase to upstream Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)
-{
- // 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;

Powered by Google App Engine
This is Rietveld 408576698