summaryrefslogtreecommitdiffstats
path: root/content/browser/compositor/buffer_queue_unittest.cc
diff options
context:
space:
mode:
authorreveman <reveman@chromium.org>2014-10-03 16:27:07 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-03 23:27:25 +0000
commit70672e94d9e6596d70fa5e59b49deecb5ae2fae1 (patch)
treed1dc9b5246a89774c80d51f71e81e519d9a8a0c9 /content/browser/compositor/buffer_queue_unittest.cc
parent9f7cc9935d1ba9143e61e2a74e288c866053722d (diff)
downloadchromium_src-70672e94d9e6596d70fa5e59b49deecb5ae2fae1.zip
chromium_src-70672e94d9e6596d70fa5e59b49deecb5ae2fae1.tar.gz
chromium_src-70672e94d9e6596d70fa5e59b49deecb5ae2fae1.tar.bz2
content: Use CHROMIUM_gpu_memory_buffer_image instead of CHROMIUM_image for BufferQueue.
This is now the preferred way to create an image when it doesn't need to be mapped as the implementation can chose whatever pixel format is ideal with for the current platform and driver. BUG=418553 Review URL: https://codereview.chromium.org/615963002 Cr-Commit-Position: refs/heads/master@{#298115}
Diffstat (limited to 'content/browser/compositor/buffer_queue_unittest.cc')
-rw-r--r--content/browser/compositor/buffer_queue_unittest.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/content/browser/compositor/buffer_queue_unittest.cc b/content/browser/compositor/buffer_queue_unittest.cc
index f4c66fb..6f61487 100644
--- a/content/browser/compositor/buffer_queue_unittest.cc
+++ b/content/browser/compositor/buffer_queue_unittest.cc
@@ -36,7 +36,7 @@ class BufferQueueTest : public ::testing::Test {
scoped_refptr<cc::TestContextProvider> context_provider =
cc::TestContextProvider::Create(cc::TestWebGraphicsContext3D::Create());
context_provider->BindToCurrentThread();
- output_surface_.reset(new MockBufferQueue(context_provider, GL_RGBA8_OES));
+ output_surface_.reset(new MockBufferQueue(context_provider, GL_RGBA));
output_surface_->Initialize();
}
@@ -119,7 +119,8 @@ class MockedContext : public cc::TestWebGraphicsContext3D {
MOCK_METHOD2(bindFramebuffer, void(GLenum, GLuint));
MOCK_METHOD2(bindTexture, void(GLenum, GLuint));
MOCK_METHOD2(bindTexImage2DCHROMIUM, void(GLenum, GLint));
- MOCK_METHOD4(createImageCHROMIUM, GLuint(GLsizei, GLsizei, GLenum, GLenum));
+ MOCK_METHOD4(createGpuMemoryBufferImageCHROMIUM,
+ GLuint(GLsizei, GLsizei, GLenum, GLenum));
MOCK_METHOD1(destroyImageCHROMIUM, void(GLuint));
MOCK_METHOD5(framebufferTexture2D,
void(GLenum, GLenum, GLenum, GLuint, GLint));
@@ -132,7 +133,7 @@ scoped_ptr<BufferQueue> CreateOutputSurfaceWithMock(MockedContext** context) {
scoped_ptr<cc::TestWebGraphicsContext3D>(*context));
context_provider->BindToCurrentThread();
scoped_ptr<BufferQueue> buffer_queue(
- new BufferQueue(context_provider, GL_RGBA8_OES));
+ new BufferQueue(context_provider, GL_RGBA));
buffer_queue->Initialize();
return buffer_queue.Pass();
}
@@ -155,11 +156,10 @@ TEST(BufferQueueStandaloneTest, FboBinding) {
CreateOutputSurfaceWithMock(&context);
EXPECT_CALL(*context, bindTexture(GL_TEXTURE_2D, Ne(0U)));
EXPECT_CALL(*context, destroyImageCHROMIUM(1));
- Expectation image =
- EXPECT_CALL(
- *context,
- createImageCHROMIUM(0, 0, GL_RGBA8_OES, GL_IMAGE_SCANOUT_CHROMIUM))
- .WillOnce(Return(1));
+ Expectation image = EXPECT_CALL(*context,
+ createGpuMemoryBufferImageCHROMIUM(
+ 0, 0, GL_RGBA, GL_IMAGE_SCANOUT_CHROMIUM))
+ .WillOnce(Return(1));
Expectation fb =
EXPECT_CALL(*context, bindFramebuffer(GL_FRAMEBUFFER, Ne(0U)));
Expectation tex = EXPECT_CALL(*context, bindTexture(GL_TEXTURE_2D, Ne(0U)));