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

Unified Diff: Source/platform/graphics/gpu/DrawingBufferTest.cpp

Issue 223223003: Re-land "WebGL: Transfer ownership of WebGraphicsContext3D to DrawingBuffer" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix errata on comment Created 6 years, 8 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
« no previous file with comments | « Source/platform/graphics/gpu/DrawingBuffer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/gpu/DrawingBufferTest.cpp
diff --git a/Source/platform/graphics/gpu/DrawingBufferTest.cpp b/Source/platform/graphics/gpu/DrawingBufferTest.cpp
index 2a9fb38d59431abc8b1d6844eb98f7a2c06c23d0..1ffc89bf61a4c2622e18a3238f1ec0034b29e7b4 100644
--- a/Source/platform/graphics/gpu/DrawingBufferTest.cpp
+++ b/Source/platform/graphics/gpu/DrawingBufferTest.cpp
@@ -110,16 +110,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;
};
@@ -137,16 +138,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;
« no previous file with comments | « Source/platform/graphics/gpu/DrawingBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698