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
3 // found in the LICENSE file.
5 #include "cc/test/fake_video_frame_provider.h"
9 FakeVideoFrameProvider::FakeVideoFrameProvider()
10 : frame_(NULL
), client_(NULL
), put_current_frame_count_(0) {
13 FakeVideoFrameProvider::~FakeVideoFrameProvider() {
15 client_
->StopUsingProvider();
18 bool FakeVideoFrameProvider::UpdateCurrentFrame(base::TimeTicks deadline_min
,
19 base::TimeTicks deadline_max
) {
20 return HasCurrentFrame();
23 void FakeVideoFrameProvider::SetVideoFrameProviderClient(Client
* client
) {
27 bool FakeVideoFrameProvider::HasCurrentFrame() {
31 scoped_refptr
<media::VideoFrame
> FakeVideoFrameProvider::GetCurrentFrame() {
35 void FakeVideoFrameProvider::PutCurrentFrame() {
36 ++put_current_frame_count_
;