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

Unified Diff: cc/output/gl_renderer_unittest.cc

Issue 2399983003: cc: Make OutputSurface::Reshape abstract (Closed)
Patch Set: reshapeabstract: . 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 | « cc/output/gl_renderer.cc ('k') | cc/output/output_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer_unittest.cc
diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc
index 3ae4ee7496310df67c00f80ed6bb7e1b12bd1224..da940bfc57dc06ecff20e0eadca911f457c383a5 100644
--- a/cc/output/gl_renderer_unittest.cc
+++ b/cc/output/gl_renderer_unittest.cc
@@ -1030,28 +1030,13 @@ class DiscardCheckingGLES2Interface : public TestGLES2Interface {
int discarded_ = 0;
};
-class NonReshapableOutputSurface : public FakeOutputSurface {
- public:
- explicit NonReshapableOutputSurface(std::unique_ptr<TestGLES2Interface> gl)
- : FakeOutputSurface(TestContextProvider::Create(std::move(gl))) {
- surface_size_ = gfx::Size(500, 500);
- }
- void Reshape(const gfx::Size& size,
- float scale_factor,
- const gfx::ColorSpace& color_space,
- bool has_alpha) override {}
- void set_fixed_size(const gfx::Size& size) { surface_size_ = size; }
-};
-
TEST_F(GLRendererTest, NoDiscardOnPartialUpdates) {
auto gl_owned = base::MakeUnique<DiscardCheckingGLES2Interface>();
auto* gl = gl_owned.get();
FakeOutputSurfaceClient output_surface_client;
- std::unique_ptr<NonReshapableOutputSurface> output_surface(
- new NonReshapableOutputSurface(std::move(gl_owned)));
+ auto output_surface = FakeOutputSurface::Create3d(std::move(gl_owned));
CHECK(output_surface->BindToClient(&output_surface_client));
- output_surface->set_fixed_size(gfx::Size(100, 100));
std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
new TestSharedBitmapManager());
@@ -1470,9 +1455,7 @@ class MockOutputSurface : public OutputSurface {
public:
MockOutputSurface()
: OutputSurface(TestContextProvider::Create(
- base::MakeUnique<StrictMock<OutputSurfaceMockContext>>())) {
- surface_size_ = gfx::Size(100, 100);
- }
+ base::MakeUnique<StrictMock<OutputSurfaceMockContext>>())) {}
virtual ~MockOutputSurface() {}
MOCK_METHOD0(EnsureBackbuffer, void());
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698