Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1129)

Side by Side Diff: cc/test/fake_video_frame_provider.cc

Issue 1958823002: Fix implicit access to raw pointer of scoped_refptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Splitting out change to scoped_refptr to follow up patch. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_video_frame_provider.h" 5 #include "cc/test/fake_video_frame_provider.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 FakeVideoFrameProvider::FakeVideoFrameProvider() 9 FakeVideoFrameProvider::FakeVideoFrameProvider()
10 : frame_(NULL), client_(NULL), put_current_frame_count_(0) { 10 : frame_(NULL), client_(NULL), put_current_frame_count_(0) {
11 } 11 }
12 12
13 FakeVideoFrameProvider::~FakeVideoFrameProvider() { 13 FakeVideoFrameProvider::~FakeVideoFrameProvider() {
14 if (client_) 14 if (client_)
15 client_->StopUsingProvider(); 15 client_->StopUsingProvider();
16 } 16 }
17 17
18 bool FakeVideoFrameProvider::UpdateCurrentFrame(base::TimeTicks deadline_min, 18 bool FakeVideoFrameProvider::UpdateCurrentFrame(base::TimeTicks deadline_min,
19 base::TimeTicks deadline_max) { 19 base::TimeTicks deadline_max) {
20 return HasCurrentFrame(); 20 return HasCurrentFrame();
21 } 21 }
22 22
23 void FakeVideoFrameProvider::SetVideoFrameProviderClient(Client* client) { 23 void FakeVideoFrameProvider::SetVideoFrameProviderClient(Client* client) {
24 client_ = client; 24 client_ = client;
25 } 25 }
26 26
27 bool FakeVideoFrameProvider::HasCurrentFrame() { 27 bool FakeVideoFrameProvider::HasCurrentFrame() {
28 return frame_; 28 return static_cast<bool>(frame_);
29 } 29 }
30 30
31 scoped_refptr<media::VideoFrame> FakeVideoFrameProvider::GetCurrentFrame() { 31 scoped_refptr<media::VideoFrame> FakeVideoFrameProvider::GetCurrentFrame() {
32 return frame_; 32 return frame_;
33 } 33 }
34 34
35 void FakeVideoFrameProvider::PutCurrentFrame() { 35 void FakeVideoFrameProvider::PutCurrentFrame() {
36 ++put_current_frame_count_; 36 ++put_current_frame_count_;
37 } 37 }
38 38
39 } // namespace cc 39 } // namespace cc
OLDNEW
« no previous file with comments | « blimp/common/blob_cache/in_memory_blob_cache_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_serialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698