| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "cc/test/fake_output_surface.h" | 5 #include "cc/test/fake_output_surface.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
| 9 #include "cc/output/output_surface_client.h" | 9 #include "cc/output/output_surface_client.h" |
| 10 #include "cc/resources/returned_resource.h" | 10 #include "cc/resources/returned_resource.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 std::unique_ptr<SoftwareOutputDevice> software_device) | 23 std::unique_ptr<SoftwareOutputDevice> software_device) |
| 24 : OutputSurface(std::move(software_device)), weak_ptr_factory_(this) { | 24 : OutputSurface(std::move(software_device)), weak_ptr_factory_(this) { |
| 25 DCHECK(OutputSurface::software_device()); | 25 DCHECK(OutputSurface::software_device()); |
| 26 } | 26 } |
| 27 | 27 |
| 28 FakeOutputSurface::~FakeOutputSurface() = default; | 28 FakeOutputSurface::~FakeOutputSurface() = default; |
| 29 | 29 |
| 30 void FakeOutputSurface::Reshape(const gfx::Size& size, | 30 void FakeOutputSurface::Reshape(const gfx::Size& size, |
| 31 float device_scale_factor, | 31 float device_scale_factor, |
| 32 const gfx::ColorSpace& color_space, | 32 const gfx::ColorSpace& color_space, |
| 33 bool has_alpha) { | 33 bool has_alpha, |
| 34 bool use_stencil) { |
| 34 if (context_provider()) { | 35 if (context_provider()) { |
| 35 context_provider()->ContextGL()->ResizeCHROMIUM( | 36 context_provider()->ContextGL()->ResizeCHROMIUM( |
| 36 size.width(), size.height(), device_scale_factor, has_alpha); | 37 size.width(), size.height(), device_scale_factor, has_alpha); |
| 37 } else { | 38 } else { |
| 38 software_device()->Resize(size, device_scale_factor); | 39 software_device()->Resize(size, device_scale_factor); |
| 39 } | 40 } |
| 40 } | 41 } |
| 41 | 42 |
| 42 void FakeOutputSurface::SwapBuffers(OutputSurfaceFrame frame) { | 43 void FakeOutputSurface::SwapBuffers(OutputSurfaceFrame frame) { |
| 43 last_sent_frame_.reset(new OutputSurfaceFrame(std::move(frame))); | 44 last_sent_frame_.reset(new OutputSurfaceFrame(std::move(frame))); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 94 |
| 94 bool FakeOutputSurface::IsDisplayedAsOverlayPlane() const { | 95 bool FakeOutputSurface::IsDisplayedAsOverlayPlane() const { |
| 95 return false; | 96 return false; |
| 96 } | 97 } |
| 97 | 98 |
| 98 unsigned FakeOutputSurface::GetOverlayTextureId() const { | 99 unsigned FakeOutputSurface::GetOverlayTextureId() const { |
| 99 return 0; | 100 return 0; |
| 100 } | 101 } |
| 101 | 102 |
| 102 } // namespace cc | 103 } // namespace cc |
| OLD | NEW |