OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef MEDIA_BLINK_SKCANVAS_VIDEO_RENDERER_H_ | 5 #ifndef MEDIA_BLINK_SKCANVAS_VIDEO_RENDERER_H_ |
6 #define MEDIA_BLINK_SKCANVAS_VIDEO_RENDERER_H_ | 6 #define MEDIA_BLINK_SKCANVAS_VIDEO_RENDERER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
11 #include "media/base/media_export.h" | |
12 #include "media/base/timestamp_constants.h" | 11 #include "media/base/timestamp_constants.h" |
13 #include "media/base/video_frame.h" | 12 #include "media/base/video_frame.h" |
14 #include "media/base/video_rotation.h" | 13 #include "media/base/video_rotation.h" |
| 14 #include "media/blink/media_blink_export.h" |
15 #include "media/filters/context_3d.h" | 15 #include "media/filters/context_3d.h" |
16 #include "skia/ext/refptr.h" | 16 #include "skia/ext/refptr.h" |
17 #include "third_party/skia/include/core/SkImage.h" | 17 #include "third_party/skia/include/core/SkImage.h" |
18 #include "third_party/skia/include/core/SkXfermode.h" | 18 #include "third_party/skia/include/core/SkXfermode.h" |
19 | 19 |
20 class SkCanvas; | 20 class SkCanvas; |
21 class SkImage; | 21 class SkImage; |
22 | 22 |
23 namespace gfx { | 23 namespace gfx { |
24 class RectF; | 24 class RectF; |
25 } | 25 } |
26 | 26 |
27 namespace media { | 27 namespace media { |
28 class VideoImageGenerator; | 28 class VideoImageGenerator; |
29 | 29 |
30 // Handles rendering of VideoFrames to SkCanvases. | 30 // Handles rendering of VideoFrames to SkCanvases. |
31 class MEDIA_EXPORT SkCanvasVideoRenderer { | 31 class MEDIA_BLINK_EXPORT SkCanvasVideoRenderer { |
32 public: | 32 public: |
33 SkCanvasVideoRenderer(); | 33 SkCanvasVideoRenderer(); |
34 ~SkCanvasVideoRenderer(); | 34 ~SkCanvasVideoRenderer(); |
35 | 35 |
36 // Paints |video_frame| on |canvas|, scaling and rotating the result to fit | 36 // Paints |video_frame| on |canvas|, scaling and rotating the result to fit |
37 // dimensions specified by |dest_rect|. | 37 // dimensions specified by |dest_rect|. |
38 // If the format of |video_frame| is PIXEL_FORMAT_NATIVE_TEXTURE, |context_3d| | 38 // If the format of |video_frame| is PIXEL_FORMAT_NATIVE_TEXTURE, |context_3d| |
39 // must be provided. | 39 // must be provided. |
40 // | 40 // |
41 // Black will be painted on |canvas| if |video_frame| is null. | 41 // Black will be painted on |canvas| if |video_frame| is null. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 base::TimeDelta last_timestamp_ = media::kNoTimestamp(); | 82 base::TimeDelta last_timestamp_ = media::kNoTimestamp(); |
83 // If |last_image_| is not used for a while, it's deleted to save memory. | 83 // If |last_image_| is not used for a while, it's deleted to save memory. |
84 base::DelayTimer last_image_deleting_timer_; | 84 base::DelayTimer last_image_deleting_timer_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(SkCanvasVideoRenderer); | 86 DISALLOW_COPY_AND_ASSIGN(SkCanvasVideoRenderer); |
87 }; | 87 }; |
88 | 88 |
89 } // namespace media | 89 } // namespace media |
90 | 90 |
91 #endif // MEDIA_BLINK_SKCANVAS_VIDEO_RENDERER_H_ | 91 #endif // MEDIA_BLINK_SKCANVAS_VIDEO_RENDERER_H_ |
OLD | NEW |