| Index: cc/test/fake_output_surface.cc
|
| diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc
|
| index 9c027eae60e99a14983618d636bbb3dbe7e6981f..95afacac0aca21dde929f9f9edb241f1ba8d129e 100644
|
| --- a/cc/test/fake_output_surface.cc
|
| +++ b/cc/test/fake_output_surface.cc
|
| @@ -82,11 +82,16 @@ void FakeOutputSurface::SwapBuffers(CompositorFrame* frame) {
|
| }
|
| }
|
|
|
| -void FakeOutputSurface::SetNeedsBeginFrame(bool enable) {
|
| - needs_begin_frame_ = enable;
|
| - OutputSurface::SetNeedsBeginFrame(enable);
|
| +void FakeOutputSurface::SetNeedsBeginFrames(bool enable) {
|
| + OutputSurface::SetNeedsBeginFrames(enable);
|
| + if (enable)
|
| + OnBeginFrame();
|
| +}
|
| +
|
| +void FakeOutputSurface::OnBeginFrame() {
|
| + if (NeedsBeginFrames()) {
|
| + SendBeginFrame(CreateBeginFrameArgsForTesting());
|
|
|
| - if (enable) {
|
| base::MessageLoop::current()->PostDelayedTask(
|
| FROM_HERE,
|
| base::Bind(&FakeOutputSurface::OnBeginFrame,
|
| @@ -95,11 +100,10 @@ void FakeOutputSurface::SetNeedsBeginFrame(bool enable) {
|
| }
|
| }
|
|
|
| -void FakeOutputSurface::OnBeginFrame() {
|
| - client_->BeginFrame(CreateBeginFrameArgsForTesting());
|
| +void FakeOutputSurface::AsValueInto(base::debug::TracedValue* dict) const {
|
| + dict->SetString("type", "FakeOutputSurface");
|
| }
|
|
|
| -
|
| bool FakeOutputSurface::BindToClient(OutputSurfaceClient* client) {
|
| if (OutputSurface::BindToClient(client)) {
|
| client_ = client;
|
|
|