| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 new FakeOutputSurface(TestContextProvider::Create(context.Pass()), | 72 new FakeOutputSurface(TestContextProvider::Create(context.Pass()), |
| 73 TestContextProvider::CreateWorker(), true)); | 73 TestContextProvider::CreateWorker(), true)); |
| 74 } | 74 } |
| 75 | 75 |
| 76 static scoped_ptr<FakeOutputSurface> CreateDelegatingSoftware( | 76 static scoped_ptr<FakeOutputSurface> CreateDelegatingSoftware( |
| 77 scoped_ptr<SoftwareOutputDevice> software_device) { | 77 scoped_ptr<SoftwareOutputDevice> software_device) { |
| 78 return make_scoped_ptr( | 78 return make_scoped_ptr( |
| 79 new FakeOutputSurface(software_device.Pass(), true)); | 79 new FakeOutputSurface(software_device.Pass(), true)); |
| 80 } | 80 } |
| 81 | 81 |
| 82 static scoped_ptr<FakeOutputSurface> CreateAlwaysDrawAndSwap3d() { | |
| 83 scoped_ptr<FakeOutputSurface> surface(Create3d()); | |
| 84 surface->capabilities_.draw_and_swap_full_viewport_every_frame = true; | |
| 85 return surface.Pass(); | |
| 86 } | |
| 87 | |
| 88 static scoped_ptr<FakeOutputSurface> CreateNoRequireSyncPoint( | 82 static scoped_ptr<FakeOutputSurface> CreateNoRequireSyncPoint( |
| 89 scoped_ptr<TestWebGraphicsContext3D> context) { | 83 scoped_ptr<TestWebGraphicsContext3D> context) { |
| 90 scoped_ptr<FakeOutputSurface> surface(Create3d(context.Pass())); | 84 scoped_ptr<FakeOutputSurface> surface(Create3d(context.Pass())); |
| 91 surface->capabilities_.delegated_sync_points_required = false; | 85 surface->capabilities_.delegated_sync_points_required = false; |
| 92 return surface.Pass(); | 86 return surface.Pass(); |
| 93 } | 87 } |
| 94 | 88 |
| 95 static scoped_ptr<FakeOutputSurface> CreateOffscreen( | 89 static scoped_ptr<FakeOutputSurface> CreateOffscreen( |
| 96 scoped_ptr<TestWebGraphicsContext3D> context) { | 90 scoped_ptr<TestWebGraphicsContext3D> context) { |
| 97 scoped_ptr<FakeOutputSurface> surface(new FakeOutputSurface( | 91 scoped_ptr<FakeOutputSurface> surface(new FakeOutputSurface( |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 bool suspended_for_recycle_; | 156 bool suspended_for_recycle_; |
| 163 unsigned framebuffer_; | 157 unsigned framebuffer_; |
| 164 TransferableResourceArray resources_held_by_parent_; | 158 TransferableResourceArray resources_held_by_parent_; |
| 165 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; | 159 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; |
| 166 gfx::Rect last_swap_rect_; | 160 gfx::Rect last_swap_rect_; |
| 167 }; | 161 }; |
| 168 | 162 |
| 169 } // namespace cc | 163 } // namespace cc |
| 170 | 164 |
| 171 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 165 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ |
| OLD | NEW |