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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 new FakeOutputSurface(TestContextProvider::Create(std::move(context)), | 47 new FakeOutputSurface(TestContextProvider::Create(std::move(context)), |
48 TestContextProvider::CreateWorker(), false)); | 48 TestContextProvider::CreateWorker(), false)); |
49 } | 49 } |
50 | 50 |
51 static scoped_ptr<FakeOutputSurface> CreateSoftware( | 51 static scoped_ptr<FakeOutputSurface> CreateSoftware( |
52 scoped_ptr<SoftwareOutputDevice> software_device) { | 52 scoped_ptr<SoftwareOutputDevice> software_device) { |
53 return make_scoped_ptr( | 53 return make_scoped_ptr( |
54 new FakeOutputSurface(std::move(software_device), false)); | 54 new FakeOutputSurface(std::move(software_device), false)); |
55 } | 55 } |
56 | 56 |
| 57 static scoped_ptr<FakeOutputSurface> |
| 58 Create3dWithResourcelessSoftwareSupport() { |
| 59 return make_scoped_ptr(new FakeOutputSurface( |
| 60 TestContextProvider::Create(), |
| 61 make_scoped_ptr(new SoftwareOutputDevice), false)); |
| 62 } |
| 63 |
57 static scoped_ptr<FakeOutputSurface> CreateDelegating3d() { | 64 static scoped_ptr<FakeOutputSurface> CreateDelegating3d() { |
58 return make_scoped_ptr( | 65 return make_scoped_ptr( |
59 new FakeOutputSurface(TestContextProvider::Create(), | 66 new FakeOutputSurface(TestContextProvider::Create(), |
60 TestContextProvider::CreateWorker(), true)); | 67 TestContextProvider::CreateWorker(), true)); |
61 } | 68 } |
62 | 69 |
63 static scoped_ptr<FakeOutputSurface> CreateDelegating3d( | 70 static scoped_ptr<FakeOutputSurface> CreateDelegating3d( |
64 scoped_refptr<TestContextProvider> context_provider) { | 71 scoped_refptr<TestContextProvider> context_provider) { |
65 return make_scoped_ptr(new FakeOutputSurface( | 72 return make_scoped_ptr(new FakeOutputSurface( |
66 context_provider, TestContextProvider::CreateWorker(), true)); | 73 context_provider, TestContextProvider::CreateWorker(), true)); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 unsigned framebuffer_; | 173 unsigned framebuffer_; |
167 TransferableResourceArray resources_held_by_parent_; | 174 TransferableResourceArray resources_held_by_parent_; |
168 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; | 175 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; |
169 OverlayCandidateValidator* overlay_candidate_validator_; | 176 OverlayCandidateValidator* overlay_candidate_validator_; |
170 gfx::Rect last_swap_rect_; | 177 gfx::Rect last_swap_rect_; |
171 }; | 178 }; |
172 | 179 |
173 } // namespace cc | 180 } // namespace cc |
174 | 181 |
175 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 182 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ |
OLD | NEW |