| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/pixel_test_output_surface.h" | 5 #include "cc/test/pixel_test_output_surface.h" |
| 6 | 6 |
| 7 #include "cc/output/output_surface_client.h" | 7 #include "cc/output/output_surface_client.h" |
| 8 #include "cc/scheduler/begin_frame_source.h" | 8 #include "cc/scheduler/begin_frame_source.h" |
| 9 #include "ui/gfx/transform.h" | 9 #include "ui/gfx/transform.h" |
| 10 | 10 |
| 11 namespace cc { | 11 namespace cc { |
| 12 | 12 |
| 13 PixelTestOutputSurface::PixelTestOutputSurface( | 13 PixelTestOutputSurface::PixelTestOutputSurface( |
| 14 scoped_refptr<ContextProvider> context_provider, | 14 std::unique_ptr<ContextProvider::DeferredCreate> context_provider_create, |
| 15 scoped_refptr<ContextProvider> worker_context_provider, | 15 scoped_refptr<ContextProvider> worker_context_provider, |
| 16 bool flipped_output_surface, | 16 bool flipped_output_surface, |
| 17 std::unique_ptr<BeginFrameSource> begin_frame_source) | 17 std::unique_ptr<BeginFrameSource> begin_frame_source) |
| 18 : OutputSurface(context_provider, worker_context_provider), | 18 : OutputSurface(std::move(context_provider_create), |
| 19 std::move(worker_context_provider)), |
| 19 begin_frame_source_(std::move(begin_frame_source)), | 20 begin_frame_source_(std::move(begin_frame_source)), |
| 20 external_stencil_test_(false) { | 21 external_stencil_test_(false) { |
| 21 capabilities_.adjust_deadline_for_parent = false; | 22 capabilities_.adjust_deadline_for_parent = false; |
| 22 capabilities_.flipped_output_surface = flipped_output_surface; | 23 capabilities_.flipped_output_surface = flipped_output_surface; |
| 23 } | 24 } |
| 24 | 25 |
| 25 PixelTestOutputSurface::PixelTestOutputSurface( | 26 PixelTestOutputSurface::PixelTestOutputSurface( |
| 26 scoped_refptr<ContextProvider> context_provider, | 27 std::unique_ptr<ContextProvider::DeferredCreate> context_provider_create, |
| 27 bool flipped_output_surface, | 28 bool flipped_output_surface, |
| 28 std::unique_ptr<BeginFrameSource> begin_frame_source) | 29 std::unique_ptr<BeginFrameSource> begin_frame_source) |
| 29 : PixelTestOutputSurface(context_provider, | 30 : PixelTestOutputSurface(std::move(context_provider_create), |
| 30 nullptr, | 31 nullptr, |
| 31 flipped_output_surface, | 32 flipped_output_surface, |
| 32 std::move(begin_frame_source)) {} | 33 std::move(begin_frame_source)) {} |
| 33 | 34 |
| 34 PixelTestOutputSurface::PixelTestOutputSurface( | 35 PixelTestOutputSurface::PixelTestOutputSurface( |
| 35 std::unique_ptr<SoftwareOutputDevice> software_device, | 36 std::unique_ptr<SoftwareOutputDevice> software_device, |
| 36 std::unique_ptr<BeginFrameSource> begin_frame_source) | 37 std::unique_ptr<BeginFrameSource> begin_frame_source) |
| 37 : OutputSurface(std::move(software_device)), | 38 : OutputSurface(std::move(software_device)), |
| 38 begin_frame_source_(std::move(begin_frame_source)), | 39 begin_frame_source_(std::move(begin_frame_source)), |
| 39 external_stencil_test_(false) {} | 40 external_stencil_test_(false) {} |
| (...skipping 22 matching lines...) Expand all Loading... |
| 62 bool PixelTestOutputSurface::HasExternalStencilTest() const { | 63 bool PixelTestOutputSurface::HasExternalStencilTest() const { |
| 63 return external_stencil_test_; | 64 return external_stencil_test_; |
| 64 } | 65 } |
| 65 | 66 |
| 66 void PixelTestOutputSurface::SwapBuffers(CompositorFrame* frame) { | 67 void PixelTestOutputSurface::SwapBuffers(CompositorFrame* frame) { |
| 67 PostSwapBuffersComplete(); | 68 PostSwapBuffersComplete(); |
| 68 client_->DidSwapBuffers(); | 69 client_->DidSwapBuffers(); |
| 69 } | 70 } |
| 70 | 71 |
| 71 } // namespace cc | 72 } // namespace cc |
| OLD | NEW |