X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcc%2Ftest%2Ffake_output_surface.cc;h=352b6e49945770260571e986514247715a00cc24;hb=004985e17e624662a4c85c76a7654039dc83f028;hp=e72253ca69e6d5f0b3c54519c4479f40623bc720;hpb=2f108dbacb161091e42a3479f4e171339b7e7623;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/cc/test/fake_output_surface.cc b/src/cc/test/fake_output_surface.cc index e72253c..352b6e4 100644 --- a/src/cc/test/fake_output_surface.cc +++ b/src/cc/test/fake_output_surface.cc @@ -19,7 +19,7 @@ FakeOutputSurface::FakeOutputSurface( : OutputSurface(context_provider), client_(NULL), num_sent_frames_(0), - needs_begin_impl_frame_(false), + needs_begin_frame_(false), forced_draw_to_software_device_(false), has_external_stencil_test_(false), fake_weak_ptr_factory_(this) { @@ -76,7 +76,7 @@ void FakeOutputSurface::SwapBuffers(CompositorFrame* frame) { ++num_sent_frames_; PostSwapBuffersComplete(); - DidSwapBuffers(); + client_->DidSwapBuffers(); } else { OutputSurface::SwapBuffers(frame); frame->AssignTo(&last_sent_frame_); @@ -84,22 +84,21 @@ void FakeOutputSurface::SwapBuffers(CompositorFrame* frame) { } } -void FakeOutputSurface::SetNeedsBeginImplFrame(bool enable) { - needs_begin_impl_frame_ = enable; - OutputSurface::SetNeedsBeginImplFrame(enable); +void FakeOutputSurface::SetNeedsBeginFrame(bool enable) { + needs_begin_frame_ = enable; + OutputSurface::SetNeedsBeginFrame(enable); - // If there is not BeginImplFrame emulation from the FrameRateController, - // then we just post a BeginImplFrame to emulate it as part of the test. - if (enable && !frame_rate_controller_) { + if (enable) { base::MessageLoop::current()->PostDelayedTask( - FROM_HERE, base::Bind(&FakeOutputSurface::OnBeginImplFrame, - fake_weak_ptr_factory_.GetWeakPtr()), + FROM_HERE, + base::Bind(&FakeOutputSurface::OnBeginFrame, + fake_weak_ptr_factory_.GetWeakPtr()), base::TimeDelta::FromMilliseconds(16)); } } -void FakeOutputSurface::OnBeginImplFrame() { - OutputSurface::BeginImplFrame(BeginFrameArgs::CreateForTesting()); +void FakeOutputSurface::OnBeginFrame() { + client_->BeginFrame(BeginFrameArgs::CreateForTesting()); }