| 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 #ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 5 #ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_ |
| 6 #define CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 6 #define CC_TEST_FAKE_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 public: | 22 public: |
| 23 ~FakeOutputSurface() override; | 23 ~FakeOutputSurface() override; |
| 24 | 24 |
| 25 static scoped_ptr<FakeOutputSurface> Create3d() { | 25 static scoped_ptr<FakeOutputSurface> Create3d() { |
| 26 return make_scoped_ptr(new FakeOutputSurface( | 26 return make_scoped_ptr(new FakeOutputSurface( |
| 27 TestContextProvider::Create(), TestContextProvider::Create(), false)); | 27 TestContextProvider::Create(), TestContextProvider::Create(), false)); |
| 28 } | 28 } |
| 29 | 29 |
| 30 static scoped_ptr<FakeOutputSurface> Create3d( | 30 static scoped_ptr<FakeOutputSurface> Create3d( |
| 31 scoped_refptr<ContextProvider> context_provider) { | 31 scoped_refptr<ContextProvider> context_provider) { |
| 32 return make_scoped_ptr(new FakeOutputSurface(context_provider, false)); | 32 return make_scoped_ptr(new FakeOutputSurface( |
| 33 context_provider, TestContextProvider::Create(), false)); |
| 33 } | 34 } |
| 34 | 35 |
| 35 static scoped_ptr<FakeOutputSurface> Create3d( | 36 static scoped_ptr<FakeOutputSurface> Create3d( |
| 36 scoped_refptr<ContextProvider> context_provider, | 37 scoped_refptr<ContextProvider> context_provider, |
| 37 scoped_refptr<ContextProvider> worker_context_provider) { | 38 scoped_refptr<ContextProvider> worker_context_provider) { |
| 38 return make_scoped_ptr(new FakeOutputSurface( | 39 return make_scoped_ptr(new FakeOutputSurface( |
| 39 context_provider, worker_context_provider, false)); | 40 context_provider, worker_context_provider, false)); |
| 40 } | 41 } |
| 41 | 42 |
| 42 static scoped_ptr<FakeOutputSurface> Create3d( | 43 static scoped_ptr<FakeOutputSurface> Create3d( |
| 43 scoped_ptr<TestWebGraphicsContext3D> context) { | 44 scoped_ptr<TestWebGraphicsContext3D> context) { |
| 44 return make_scoped_ptr(new FakeOutputSurface( | 45 return make_scoped_ptr( |
| 45 TestContextProvider::Create(context.Pass()), false)); | 46 new FakeOutputSurface(TestContextProvider::Create(context.Pass()), |
| 47 TestContextProvider::Create(), false)); |
| 46 } | 48 } |
| 47 | 49 |
| 48 static scoped_ptr<FakeOutputSurface> CreateSoftware( | 50 static scoped_ptr<FakeOutputSurface> CreateSoftware( |
| 49 scoped_ptr<SoftwareOutputDevice> software_device) { | 51 scoped_ptr<SoftwareOutputDevice> software_device) { |
| 50 return make_scoped_ptr(new FakeOutputSurface(software_device.Pass(), | 52 return make_scoped_ptr(new FakeOutputSurface(software_device.Pass(), |
| 51 false)); | 53 false)); |
| 52 } | 54 } |
| 53 | 55 |
| 54 static scoped_ptr<FakeOutputSurface> CreateDelegating3d() { | 56 static scoped_ptr<FakeOutputSurface> CreateDelegating3d() { |
| 55 return make_scoped_ptr(new FakeOutputSurface( | 57 return make_scoped_ptr(new FakeOutputSurface( |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 bool has_external_stencil_test_; | 151 bool has_external_stencil_test_; |
| 150 unsigned framebuffer_; | 152 unsigned framebuffer_; |
| 151 TransferableResourceArray resources_held_by_parent_; | 153 TransferableResourceArray resources_held_by_parent_; |
| 152 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; | 154 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; |
| 153 gfx::Rect last_swap_rect_; | 155 gfx::Rect last_swap_rect_; |
| 154 }; | 156 }; |
| 155 | 157 |
| 156 } // namespace cc | 158 } // namespace cc |
| 157 | 159 |
| 158 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 160 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ |
| OLD | NEW |