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.h" | 8 #include "base/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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // then we just post a BeginFrame to emulate it as part of the test. | 76 // then we just post a BeginFrame to emulate it as part of the test. |
77 if (enable && !frame_rate_controller_) { | 77 if (enable && !frame_rate_controller_) { |
78 base::MessageLoop::current()->PostDelayedTask( | 78 base::MessageLoop::current()->PostDelayedTask( |
79 FROM_HERE, base::Bind(&FakeOutputSurface::OnBeginFrame, | 79 FROM_HERE, base::Bind(&FakeOutputSurface::OnBeginFrame, |
80 fake_weak_ptr_factory_.GetWeakPtr()), | 80 fake_weak_ptr_factory_.GetWeakPtr()), |
81 base::TimeDelta::FromMilliseconds(16)); | 81 base::TimeDelta::FromMilliseconds(16)); |
82 } | 82 } |
83 } | 83 } |
84 | 84 |
85 void FakeOutputSurface::OnBeginFrame() { | 85 void FakeOutputSurface::OnBeginFrame() { |
86 OutputSurface::BeginFrame(base::TimeTicks::Now()); | 86 OutputSurface::BeginFrame(BeginFrameArgs::CreateForTesting()); |
87 } | 87 } |
88 | 88 |
89 | 89 |
90 bool FakeOutputSurface::ForcedDrawToSoftwareDevice() const { | 90 bool FakeOutputSurface::ForcedDrawToSoftwareDevice() const { |
91 return forced_draw_to_software_device_; | 91 return forced_draw_to_software_device_; |
92 } | 92 } |
93 | 93 |
94 } // namespace cc | 94 } // namespace cc |
OLD | NEW |