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

Side by Side Diff: content/browser/compositor/buffer_queue_unittest.cc

Issue 962723002: Change CHROMIUM_image declarations to support multi planar input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reveman@ comments. Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <set> 5 #include <set>
6 6
7 #include "cc/test/test_context_provider.h" 7 #include "cc/test/test_context_provider.h"
8 #include "cc/test/test_web_graphics_context_3d.h" 8 #include "cc/test/test_web_graphics_context_3d.h"
9 #include "content/browser/compositor/buffer_queue.h" 9 #include "content/browser/compositor/buffer_queue.h"
10 #include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_s urface.h" 10 #include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_s urface.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 const gfx::Rect small_damage = gfx::Rect(gfx::Size(10, 10)); 155 const gfx::Rect small_damage = gfx::Rect(gfx::Size(10, 10));
156 const gfx::Rect large_damage = gfx::Rect(gfx::Size(20, 20)); 156 const gfx::Rect large_damage = gfx::Rect(gfx::Size(20, 20));
157 const gfx::Rect overlapping_damage = gfx::Rect(gfx::Size(5, 20)); 157 const gfx::Rect overlapping_damage = gfx::Rect(gfx::Size(5, 20));
158 158
159 class MockedContext : public cc::TestWebGraphicsContext3D { 159 class MockedContext : public cc::TestWebGraphicsContext3D {
160 public: 160 public:
161 MOCK_METHOD2(bindFramebuffer, void(GLenum, GLuint)); 161 MOCK_METHOD2(bindFramebuffer, void(GLenum, GLuint));
162 MOCK_METHOD2(bindTexture, void(GLenum, GLuint)); 162 MOCK_METHOD2(bindTexture, void(GLenum, GLuint));
163 MOCK_METHOD2(bindTexImage2DCHROMIUM, void(GLenum, GLint)); 163 MOCK_METHOD2(bindTexImage2DCHROMIUM, void(GLenum, GLint));
164 MOCK_METHOD4(createImageCHROMIUM, 164 MOCK_METHOD4(createImageCHROMIUM,
165 GLuint(ClientBuffer, GLsizei, GLsizei, GLenum)); 165 GLuint(ClientBuffer*, GLsizei, GLsizei, GLenum));
166 MOCK_METHOD1(destroyImageCHROMIUM, void(GLuint)); 166 MOCK_METHOD1(destroyImageCHROMIUM, void(GLuint));
167 MOCK_METHOD5(framebufferTexture2D, 167 MOCK_METHOD5(framebufferTexture2D,
168 void(GLenum, GLenum, GLenum, GLuint, GLint)); 168 void(GLenum, GLenum, GLenum, GLuint, GLint));
169 }; 169 };
170 170
171 scoped_ptr<BufferQueue> CreateOutputSurfaceWithMock( 171 scoped_ptr<BufferQueue> CreateOutputSurfaceWithMock(
172 MockedContext** context, 172 MockedContext** context,
173 BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager) { 173 BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager) {
174 *context = new MockedContext(); 174 *context = new MockedContext();
175 scoped_refptr<cc::TestContextProvider> context_provider = 175 scoped_refptr<cc::TestContextProvider> context_provider =
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 output_surface_->PageFlipComplete(); 355 output_surface_->PageFlipComplete();
356 EXPECT_EQ(3, CountBuffers()); 356 EXPECT_EQ(3, CountBuffers());
357 CheckUnique(); 357 CheckUnique();
358 EXPECT_NE(0U, current_surface()); 358 EXPECT_NE(0U, current_surface());
359 EXPECT_EQ(1U, in_flight_surfaces().size()); 359 EXPECT_EQ(1U, in_flight_surfaces().size());
360 EXPECT_EQ(1U, available_surfaces().size()); 360 EXPECT_EQ(1U, available_surfaces().size());
361 } 361 }
362 362
363 } // namespace 363 } // namespace
364 } // namespace content 364 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698