| Index: Source/platform/graphics/gpu/DrawingBufferTest.cpp
|
| diff --git a/Source/platform/graphics/gpu/DrawingBufferTest.cpp b/Source/platform/graphics/gpu/DrawingBufferTest.cpp
|
| index 767fcfdbff1c091bbb348c01d841da384e902627..dfca67a44f8e970bc8ca6a94fff11c1b5f542f65 100644
|
| --- a/Source/platform/graphics/gpu/DrawingBufferTest.cpp
|
| +++ b/Source/platform/graphics/gpu/DrawingBufferTest.cpp
|
| @@ -620,4 +620,25 @@ TEST(DrawingBufferDepthStencilTest, packedDepthStencilSupported)
|
| }
|
| }
|
|
|
| +TEST_F(DrawingBufferTest, verifySetIsHiddenProperlyAffectsMailboxes)
|
| +{
|
| + blink::WebExternalTextureMailbox mailbox;
|
| +
|
| + // Produce mailboxes.
|
| + m_drawingBuffer->markContentsChanged();
|
| + EXPECT_TRUE(m_drawingBuffer->prepareMailbox(&mailbox, 0));
|
| +
|
| + unsigned waitSyncPoint = webContext()->insertSyncPoint();
|
| + mailbox.syncPoint = waitSyncPoint;
|
| + m_drawingBuffer->setIsHidden(true);
|
| + m_drawingBuffer->mailboxReleased(mailbox);
|
| + // m_drawingBuffer deletes mailbox immediately when hidden.
|
| + EXPECT_EQ(waitSyncPoint, webContext()->mostRecentlyWaitedSyncPoint());
|
| +
|
| + // Fails to get mailbox when hidden.
|
| + EXPECT_FALSE(m_drawingBuffer->prepareMailbox(&mailbox, 0));
|
| +
|
| + m_drawingBuffer->beginDestruction();
|
| +}
|
| +
|
| } // namespace
|
|
|