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" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 bool flip_y); | 74 bool flip_y); |
75 | 75 |
76 private: | 76 private: |
77 void ResetCache(); | 77 void ResetCache(); |
78 | 78 |
79 // Last image used to draw to the canvas. | 79 // Last image used to draw to the canvas. |
80 skia::RefPtr<SkImage> last_image_; | 80 skia::RefPtr<SkImage> last_image_; |
81 // Timestamp of the videoframe used to generate |last_image_|. | 81 // Timestamp of the videoframe used to generate |last_image_|. |
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<SkCanvasVideoRenderer> 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 |