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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 false)); | 53 false)); |
54 } | 54 } |
55 | 55 |
56 static scoped_ptr<FakeOutputSurface> CreateDelegating3d() { | 56 static scoped_ptr<FakeOutputSurface> CreateDelegating3d() { |
57 return make_scoped_ptr(new FakeOutputSurface( | 57 return make_scoped_ptr(new FakeOutputSurface( |
58 TestContextProvider::Create(), TestContextProvider::Create(), true)); | 58 TestContextProvider::Create(), TestContextProvider::Create(), true)); |
59 } | 59 } |
60 | 60 |
61 static scoped_ptr<FakeOutputSurface> CreateDelegating3d( | 61 static scoped_ptr<FakeOutputSurface> CreateDelegating3d( |
62 scoped_refptr<TestContextProvider> context_provider) { | 62 scoped_refptr<TestContextProvider> context_provider) { |
63 return make_scoped_ptr(new FakeOutputSurface( | 63 return make_scoped_ptr(new FakeOutputSurface(context_provider, true)); |
64 context_provider, TestContextProvider::Create(), true)); | |
65 } | 64 } |
66 | 65 |
67 static scoped_ptr<FakeOutputSurface> CreateDelegating3d( | 66 static scoped_ptr<FakeOutputSurface> CreateDelegating3d( |
68 scoped_ptr<TestWebGraphicsContext3D> context) { | 67 scoped_ptr<TestWebGraphicsContext3D> context) { |
69 return make_scoped_ptr( | 68 return make_scoped_ptr(new FakeOutputSurface( |
70 new FakeOutputSurface(TestContextProvider::Create(context.Pass()), | 69 TestContextProvider::Create(context.Pass()), true)); |
71 TestContextProvider::Create(), true)); | |
72 } | 70 } |
73 | 71 |
74 static scoped_ptr<FakeOutputSurface> CreateDelegatingSoftware( | 72 static scoped_ptr<FakeOutputSurface> CreateDelegatingSoftware( |
75 scoped_ptr<SoftwareOutputDevice> software_device) { | 73 scoped_ptr<SoftwareOutputDevice> software_device) { |
76 return make_scoped_ptr( | 74 return make_scoped_ptr( |
77 new FakeOutputSurface(software_device.Pass(), true)); | 75 new FakeOutputSurface(software_device.Pass(), true)); |
78 } | 76 } |
79 | 77 |
80 static scoped_ptr<FakeOutputSurface> CreateAlwaysDrawAndSwap3d() { | 78 static scoped_ptr<FakeOutputSurface> CreateAlwaysDrawAndSwap3d() { |
81 scoped_ptr<FakeOutputSurface> surface(Create3d()); | 79 scoped_ptr<FakeOutputSurface> surface(Create3d()); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 bool suspended_for_recycle_; | 158 bool suspended_for_recycle_; |
161 unsigned framebuffer_; | 159 unsigned framebuffer_; |
162 TransferableResourceArray resources_held_by_parent_; | 160 TransferableResourceArray resources_held_by_parent_; |
163 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; | 161 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; |
164 gfx::Rect last_swap_rect_; | 162 gfx::Rect last_swap_rect_; |
165 }; | 163 }; |
166 | 164 |
167 } // namespace cc | 165 } // namespace cc |
168 | 166 |
169 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 167 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ |
OLD | NEW |