| 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 #include "cc/test/fake_output_surface.h" | 5 #include "cc/test/fake_output_surface.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "cc/output/compositor_frame_ack.h" | 9 #include "cc/output/compositor_frame_ack.h" |
| 10 #include "cc/output/output_surface_client.h" | 10 #include "cc/output/output_surface_client.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 if (delegated_rendering) { | 39 if (delegated_rendering) { |
| 40 capabilities_.delegated_rendering = true; | 40 capabilities_.delegated_rendering = true; |
| 41 capabilities_.max_frames_pending = 1; | 41 capabilities_.max_frames_pending = 1; |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 | 44 |
| 45 FakeOutputSurface::FakeOutputSurface( | 45 FakeOutputSurface::FakeOutputSurface( |
| 46 scoped_refptr<ContextProvider> context_provider, | 46 scoped_refptr<ContextProvider> context_provider, |
| 47 scoped_ptr<SoftwareOutputDevice> software_device, | 47 scoped_ptr<SoftwareOutputDevice> software_device, |
| 48 bool delegated_rendering) | 48 bool delegated_rendering) |
| 49 : OutputSurface(context_provider, software_device.Pass()), | 49 : OutputSurface(context_provider, |
| 50 scoped_refptr<ContextProvider>(), |
| 51 software_device.Pass()), |
| 50 client_(NULL), | 52 client_(NULL), |
| 51 num_sent_frames_(0), | 53 num_sent_frames_(0), |
| 52 has_external_stencil_test_(false), | 54 has_external_stencil_test_(false), |
| 53 framebuffer_(0) { | 55 framebuffer_(0) { |
| 54 if (delegated_rendering) { | 56 if (delegated_rendering) { |
| 55 capabilities_.delegated_rendering = true; | 57 capabilities_.delegated_rendering = true; |
| 56 capabilities_.max_frames_pending = 1; | 58 capabilities_.max_frames_pending = 1; |
| 57 } | 59 } |
| 58 } | 60 } |
| 59 | 61 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 bool FakeOutputSurface::HasExternalStencilTest() const { | 126 bool FakeOutputSurface::HasExternalStencilTest() const { |
| 125 return has_external_stencil_test_; | 127 return has_external_stencil_test_; |
| 126 } | 128 } |
| 127 | 129 |
| 128 void FakeOutputSurface::SetMemoryPolicyToSetAtBind( | 130 void FakeOutputSurface::SetMemoryPolicyToSetAtBind( |
| 129 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind) { | 131 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind) { |
| 130 memory_policy_to_set_at_bind_.swap(memory_policy_to_set_at_bind); | 132 memory_policy_to_set_at_bind_.swap(memory_policy_to_set_at_bind); |
| 131 } | 133 } |
| 132 | 134 |
| 133 } // namespace cc | 135 } // namespace cc |
| OLD | NEW |