| Index: components/display_compositor/buffer_queue_unittest.cc
|
| diff --git a/components/display_compositor/buffer_queue_unittest.cc b/components/display_compositor/buffer_queue_unittest.cc
|
| index 78a01880435cbebfa2e23a05a609d6cde74ee889..17ef79b0a8c3ccf4815ea7187d6e67d880a74ccd 100644
|
| --- a/components/display_compositor/buffer_queue_unittest.cc
|
| +++ b/components/display_compositor/buffer_queue_unittest.cc
|
| @@ -19,6 +19,7 @@
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "third_party/khronos/GLES2/gl2ext.h"
|
| +#include "ui/display/types/display_snapshot.h"
|
|
|
| using ::testing::_;
|
| using ::testing::Expectation;
|
| @@ -101,6 +102,7 @@ class MockBufferQueue : public BufferQueue {
|
| : BufferQueue(gl,
|
| target,
|
| internalformat,
|
| + ui::DisplaySnapshot::PrimaryFormat(),
|
| nullptr,
|
| gpu_memory_buffer_manager,
|
| kFakeSurfaceHandle) {}
|
| @@ -122,7 +124,7 @@ class BufferQueueTest : public ::testing::Test {
|
| gpu_memory_buffer_manager_.reset(new StubGpuMemoryBufferManager);
|
| mock_output_surface_ = new MockBufferQueue(context_provider_->ContextGL(),
|
| gpu_memory_buffer_manager_.get(),
|
| - GL_TEXTURE_2D, GL_RGBA);
|
| + GL_TEXTURE_2D, GL_RGB);
|
| output_surface_.reset(mock_output_surface_);
|
| output_surface_->Initialize();
|
| }
|
| @@ -262,8 +264,8 @@ std::unique_ptr<BufferQueue> CreateBufferQueue(
|
| gpu::gles2::GLES2Interface* gl,
|
| gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) {
|
| std::unique_ptr<BufferQueue> buffer_queue(
|
| - new BufferQueue(gl, target, GL_RGBA, nullptr, gpu_memory_buffer_manager,
|
| - kFakeSurfaceHandle));
|
| + new BufferQueue(gl, target, GL_RGB, ui::DisplaySnapshot::PrimaryFormat(),
|
| + nullptr, gpu_memory_buffer_manager, kFakeSurfaceHandle));
|
| buffer_queue->Initialize();
|
| return buffer_queue;
|
| }
|
| @@ -301,7 +303,7 @@ TEST(BufferQueueStandaloneTest, FboBinding) {
|
| EXPECT_CALL(*context, bindTexture(target, Ne(0U)));
|
| EXPECT_CALL(*context, destroyImageCHROMIUM(1));
|
| Expectation image =
|
| - EXPECT_CALL(*context, createImageCHROMIUM(_, 0, 0, GL_RGBA))
|
| + EXPECT_CALL(*context, createImageCHROMIUM(_, 0, 0, GL_RGB))
|
| .WillOnce(Return(1));
|
| Expectation fb =
|
| EXPECT_CALL(*context, bindFramebuffer(GL_FRAMEBUFFER, Ne(0U)));
|
| @@ -330,9 +332,10 @@ TEST(BufferQueueStandaloneTest, CheckBoundFramebuffer) {
|
| gl_helper.reset(new GLHelper(context_provider->ContextGL(),
|
| context_provider->ContextSupport()));
|
|
|
| - output_surface.reset(new BufferQueue(
|
| - context_provider->ContextGL(), GL_TEXTURE_2D, GL_RGBA, gl_helper.get(),
|
| - gpu_memory_buffer_manager.get(), kFakeSurfaceHandle));
|
| + output_surface.reset(
|
| + new BufferQueue(context_provider->ContextGL(), GL_TEXTURE_2D, GL_RGB,
|
| + ui::DisplaySnapshot::PrimaryFormat(), gl_helper.get(),
|
| + gpu_memory_buffer_manager.get(), kFakeSurfaceHandle));
|
| output_surface->Initialize();
|
| output_surface->Reshape(screen_size, 1.0f, gfx::ColorSpace());
|
| // Trigger a sub-buffer copy to exercise all paths.
|
| @@ -581,7 +584,7 @@ TEST_F(BufferQueueMockedContextTest, RecreateBuffers) {
|
|
|
| // Expect all 4 images to be destroyed, 3 of the existing textures to be
|
| // copied from and 3 new images to be created.
|
| - EXPECT_CALL(*context_, createImageCHROMIUM(_, 0, 0, GL_RGBA)).Times(3);
|
| + EXPECT_CALL(*context_, createImageCHROMIUM(_, 0, 0, GL_RGB)).Times(3);
|
| Expectation copy1 = EXPECT_CALL(*mock_output_surface_,
|
| CopyBufferDamage(_, displayed->texture, _, _))
|
| .Times(1);
|
|
|