| Index: cc/test/fake_output_surface.cc
|
| diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc
|
| index 7d5a296b32e4d26de065c3d1320f6fd454212b6b..a096f7f37c7160ec8bff102da25d13d5b8da750b 100644
|
| --- a/cc/test/fake_output_surface.cc
|
| +++ b/cc/test/fake_output_surface.cc
|
| @@ -15,14 +15,30 @@ namespace cc {
|
|
|
| FakeOutputSurface::FakeOutputSurface(
|
| scoped_refptr<ContextProvider> context_provider)
|
| - : OutputSurface(std::move(context_provider)) {}
|
| + : OutputSurface(std::move(context_provider)) {
|
| + DCHECK(OutputSurface::context_provider());
|
| +}
|
|
|
| FakeOutputSurface::FakeOutputSurface(
|
| std::unique_ptr<SoftwareOutputDevice> software_device)
|
| - : OutputSurface(std::move(software_device)) {}
|
| + : OutputSurface(std::move(software_device)) {
|
| + DCHECK(OutputSurface::software_device());
|
| +}
|
|
|
| FakeOutputSurface::~FakeOutputSurface() = default;
|
|
|
| +void FakeOutputSurface::Reshape(const gfx::Size& size,
|
| + float device_scale_factor,
|
| + const gfx::ColorSpace& color_space,
|
| + bool has_alpha) {
|
| + if (context_provider()) {
|
| + context_provider()->ContextGL()->ResizeCHROMIUM(
|
| + size.width(), size.height(), device_scale_factor, has_alpha);
|
| + } else {
|
| + software_device()->Resize(size, device_scale_factor);
|
| + }
|
| +}
|
| +
|
| void FakeOutputSurface::SwapBuffers(OutputSurfaceFrame frame) {
|
| last_sent_frame_.reset(new OutputSurfaceFrame(std::move(frame)));
|
| ++num_sent_frames_;
|
|
|