Chromium Code Reviews| 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_FILTERS_SKCANVAS_VIDEO_RENDERER_H_ | 5 #ifndef MEDIA_FILTERS_SKCANVAS_VIDEO_RENDERER_H_ |
| 6 #define MEDIA_FILTERS_SKCANVAS_VIDEO_RENDERER_H_ | 6 #define MEDIA_FILTERS_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 "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 SkCanvas* canvas, | 35 SkCanvas* canvas, |
| 36 const gfx::RectF& dest_rect, | 36 const gfx::RectF& dest_rect, |
| 37 uint8 alpha, | 37 uint8 alpha, |
| 38 SkXfermode::Mode mode, | 38 SkXfermode::Mode mode, |
| 39 VideoRotation video_rotation); | 39 VideoRotation video_rotation); |
| 40 | 40 |
| 41 // Copy |video_frame| on |canvas|. | 41 // Copy |video_frame| on |canvas|. |
| 42 void Copy(const scoped_refptr<VideoFrame>&, SkCanvas* canvas); | 42 void Copy(const scoped_refptr<VideoFrame>&, SkCanvas* canvas); |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 VideoImageGenerator* generator_; | 45 void CleanUpTemporaryBuffers(); |
| 46 | 46 |
| 47 // An RGB bitmap and corresponding timestamp of the previously converted | 47 // An RGB bitmap and corresponding timestamp of the previously converted |
|
scherkus (not reviewing)
2014/10/22 23:17:36
I would be more explicit here to say it mention th
| |
| 48 // video frame data. | 48 // video frame data. |
| 49 SkBitmap last_frame_; | 49 SkBitmap last_frame_; |
| 50 base::TimeDelta last_frame_timestamp_; | 50 base::TimeDelta last_frame_timestamp_; |
| 51 | 51 |
| 52 // It's used by accelerated SkCanvas which is passed by a client. | |
|
scherkus (not reviewing)
2014/10/22 23:17:36
ditto here to highlight that this is a hardware ac
| |
| 53 // Note: all GrContext in SkCanvas instances are same. | |
| 54 SkBitmap accelerated_last_frame_; | |
| 55 VideoImageGenerator* accelerated_generator_; | |
| 56 base::TimeDelta accelerated_last_frame_timestamp_; | |
| 57 | |
| 52 DISALLOW_COPY_AND_ASSIGN(SkCanvasVideoRenderer); | 58 DISALLOW_COPY_AND_ASSIGN(SkCanvasVideoRenderer); |
| 53 }; | 59 }; |
| 54 | 60 |
| 55 } // namespace media | 61 } // namespace media |
| 56 | 62 |
| 57 #endif // MEDIA_FILTERS_SKCANVAS_VIDEO_RENDERER_H_ | 63 #endif // MEDIA_FILTERS_SKCANVAS_VIDEO_RENDERER_H_ |
| OLD | NEW |