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

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

Issue 2399733002: DrawingBuffer cleanup: Part 1 of many (Closed)
Patch Set: Fix size update Created 4 years, 2 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 | « third_party/WebKit/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: third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp
index 1e48e05dbb1b736c07f0feea27786258f1f6591a..ca2d94135deea63d6b2b6908bfb359519af156df 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp
@@ -326,6 +326,8 @@ TEST_F(DrawingBufferImageChromiumTest, verifyResizingReallocatesImages) {
EXPECT_CALL(*m_gl, BindTexImage2DMock(m_imageId2)).Times(1);
EXPECT_CALL(*m_gl, DestroyImageMock(m_imageId0)).Times(1);
EXPECT_CALL(*m_gl, ReleaseTexImage2DMock(m_imageId0)).Times(1);
+ EXPECT_CALL(*m_gl, DestroyImageMock(m_imageId1)).Times(1);
+ EXPECT_CALL(*m_gl, ReleaseTexImage2DMock(m_imageId1)).Times(1);
// Resize to 100x50.
m_drawingBuffer->reset(alternateSize);
releaseCallback->Run(gpu::SyncToken(), false /* lostResource */);
@@ -333,8 +335,6 @@ TEST_F(DrawingBufferImageChromiumTest, verifyResizingReallocatesImages) {
GLuint m_imageId3 = m_gl->nextImageIdToBeCreated();
EXPECT_CALL(*m_gl, BindTexImage2DMock(m_imageId3)).Times(1);
- EXPECT_CALL(*m_gl, DestroyImageMock(m_imageId1)).Times(1);
- EXPECT_CALL(*m_gl, ReleaseTexImage2DMock(m_imageId1)).Times(1);
// Produce a mailbox at this size.
m_drawingBuffer->markContentsChanged();
EXPECT_TRUE(m_drawingBuffer->PrepareTextureMailbox(&textureMailbox,
@@ -347,6 +347,8 @@ TEST_F(DrawingBufferImageChromiumTest, verifyResizingReallocatesImages) {
EXPECT_CALL(*m_gl, BindTexImage2DMock(m_imageId4)).Times(1);
EXPECT_CALL(*m_gl, DestroyImageMock(m_imageId2)).Times(1);
EXPECT_CALL(*m_gl, ReleaseTexImage2DMock(m_imageId2)).Times(1);
+ EXPECT_CALL(*m_gl, DestroyImageMock(m_imageId3)).Times(1);
+ EXPECT_CALL(*m_gl, ReleaseTexImage2DMock(m_imageId3)).Times(1);
// Reset to initial size.
m_drawingBuffer->reset(initialSize);
releaseCallback->Run(gpu::SyncToken(), false /* lostResource */);
@@ -354,8 +356,6 @@ TEST_F(DrawingBufferImageChromiumTest, verifyResizingReallocatesImages) {
GLuint m_imageId5 = m_gl->nextImageIdToBeCreated();
EXPECT_CALL(*m_gl, BindTexImage2DMock(m_imageId5)).Times(1);
- EXPECT_CALL(*m_gl, DestroyImageMock(m_imageId3)).Times(1);
- EXPECT_CALL(*m_gl, ReleaseTexImage2DMock(m_imageId3)).Times(1);
// Prepare another mailbox and verify that it's the correct size.
m_drawingBuffer->markContentsChanged();
EXPECT_TRUE(m_drawingBuffer->PrepareTextureMailbox(&textureMailbox,
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698