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

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

Issue 11754003: Move VideoFrameProvider to, and remove all usage of WebVideoFrame from cc/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « cc/test/fake_video_frame.h ('k') | cc/test/fake_video_frame_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "cc/test/fake_video_frame.h"
6
7 namespace cc {
8
9 FakeVideoFrame::FakeVideoFrame(const scoped_refptr<media::VideoFrame>& frame)
10 : frame_(frame) {}
11
12 FakeVideoFrame::~FakeVideoFrame() {}
13
14 WebKit::WebVideoFrame::Format FakeVideoFrame::format() const {
15 return FormatInvalid;
16 }
17
18 unsigned FakeVideoFrame::width() const {
19 return frame_->natural_size().width();
20 }
21
22 unsigned FakeVideoFrame::height() const {
23 return frame_->natural_size().height();
24 }
25
26 unsigned FakeVideoFrame::planes() const {
27 return 0;
28 }
29
30 int FakeVideoFrame::stride(unsigned plane) const {
31 return 0;
32 }
33
34 const void* FakeVideoFrame::data(unsigned plane) const {
35 return NULL;
36 }
37
38 unsigned FakeVideoFrame::textureId() const {
39 return frame_->texture_id();
40 }
41
42 unsigned FakeVideoFrame::textureTarget() const {
43 return frame_->texture_target();
44 }
45
46 WebKit::WebRect FakeVideoFrame::visibleRect() const {
47 return frame_->visible_rect();
48 }
49
50 WebKit::WebSize FakeVideoFrame::textureSize() const {
51 return frame_->coded_size();
52 }
53
54 // static
55 media::VideoFrame* FakeVideoFrame::ToVideoFrame(
56 WebKit::WebVideoFrame* web_video_frame) {
57 if (!web_video_frame)
58 return NULL;
59 FakeVideoFrame* fake_frame = static_cast<FakeVideoFrame*>(web_video_frame);
60 return fake_frame->frame_.get();
61 }
62
63 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_video_frame.h ('k') | cc/test/fake_video_frame_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698