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

Side by Side Diff: webkit/media/skcanvas_video_renderer.h

Issue 11234071: Moved SkCanvasVideoRenderer to media/filters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added MEDIA_EXPORT. Created 8 years, 2 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 | « skia/config/win/stdint.h ('k') | webkit/media/skcanvas_video_renderer.cc » ('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 (c) 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 #ifndef WEBKIT_MEDIA_SKCANVAS_VIDEO_RENDERER_H_
6 #define WEBKIT_MEDIA_SKCANVAS_VIDEO_RENDERER_H_
7
8 #include "base/time.h"
9 #include "ui/gfx/rect.h"
10 #include "third_party/skia/include/core/SkBitmap.h"
11
12 class SkCanvas;
13
14 namespace media {
15 class VideoFrame;
16 }
17
18 namespace webkit_media {
19
20 // Handles rendering of VideoFrames to SkCanvases, doing any necessary YUV
21 // conversion and caching of resulting RGB bitmaps.
22 class SkCanvasVideoRenderer {
23 public:
24 SkCanvasVideoRenderer();
25 ~SkCanvasVideoRenderer();
26
27 // Paints |video_frame| on |canvas|, scaling the result to fit dimensions
28 // specified by |dest_rect|.
29 //
30 // Black will be painted on |canvas| if |video_frame| is null.
31 void Paint(media::VideoFrame* video_frame,
32 SkCanvas* canvas,
33 const gfx::Rect& dest_rect,
34 uint8_t alpha);
35
36 private:
37 // An RGB bitmap and corresponding timestamp of the previously converted
38 // video frame data.
39 SkBitmap last_frame_;
40 base::TimeDelta last_frame_timestamp_;
41
42 DISALLOW_COPY_AND_ASSIGN(SkCanvasVideoRenderer);
43 };
44
45 } // namespace webkit_media
46
47 #endif // WEBKIT_MEDIA_SKCANVAS_VIDEO_RENDERER_H_
OLDNEW
« no previous file with comments | « skia/config/win/stdint.h ('k') | webkit/media/skcanvas_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698