| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // The video renderer implementation to be use by the media pipeline. It lives | 5 // The video renderer implementation to be use by the media pipeline. It lives |
| 6 // inside video renderer thread and also WebKit's main thread. We need to be | 6 // inside video renderer thread and also WebKit's main thread. We need to be |
| 7 // extra careful about members shared by two different threads, especially | 7 // extra careful about members shared by two different threads, especially |
| 8 // video frame buffers. | 8 // video frame buffers. |
| 9 | 9 |
| 10 #ifndef WEBKIT_GLUE_MEDIA_VIDEO_RENDERER_IMPL_H_ | 10 #ifndef WEBKIT_GLUE_MEDIA_VIDEO_RENDERER_IMPL_H_ |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 // Method called by the VideoRendererBase when a frame is available. | 67 // Method called by the VideoRendererBase when a frame is available. |
| 68 virtual void OnFrameAvailable(); | 68 virtual void OnFrameAvailable(); |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 // Only the filter factories can create instances. | 71 // Only the filter factories can create instances. |
| 72 friend class media::FilterFactoryImpl2<VideoRendererImpl, | 72 friend class media::FilterFactoryImpl2<VideoRendererImpl, |
| 73 WebMediaPlayerImpl::Proxy*, | 73 WebMediaPlayerImpl::Proxy*, |
| 74 bool>; | 74 bool>; |
| 75 VideoRendererImpl(WebMediaPlayerImpl::Proxy* proxy, bool pts_logging); | 75 VideoRendererImpl(WebMediaPlayerImpl::Proxy* proxy, bool pts_logging); |
| 76 virtual ~VideoRendererImpl() {} | 76 virtual ~VideoRendererImpl(); |
| 77 | 77 |
| 78 // Determine the conditions to perform fast paint. Returns true if we can do | 78 // Determine the conditions to perform fast paint. Returns true if we can do |
| 79 // fast paint otherwise false. | 79 // fast paint otherwise false. |
| 80 bool CanFastPaint(skia::PlatformCanvas* canvas, const gfx::Rect& dest_rect); | 80 bool CanFastPaint(skia::PlatformCanvas* canvas, const gfx::Rect& dest_rect); |
| 81 | 81 |
| 82 // Slow paint does a YUV => RGB, and scaled blit in two separate operations. | 82 // Slow paint does a YUV => RGB, and scaled blit in two separate operations. |
| 83 void SlowPaint(media::VideoFrame* video_frame, | 83 void SlowPaint(media::VideoFrame* video_frame, |
| 84 skia::PlatformCanvas* canvas, | 84 skia::PlatformCanvas* canvas, |
| 85 const gfx::Rect& dest_rect); | 85 const gfx::Rect& dest_rect); |
| 86 | 86 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 115 | 115 |
| 116 // Whether we're logging video presentation timestamps (PTS). | 116 // Whether we're logging video presentation timestamps (PTS). |
| 117 bool pts_logging_; | 117 bool pts_logging_; |
| 118 | 118 |
| 119 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); | 119 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 } // namespace webkit_glue | 122 } // namespace webkit_glue |
| 123 | 123 |
| 124 #endif // WEBKIT_GLUE_MEDIA_VIDEO_RENDERER_IMPL_H_ | 124 #endif // WEBKIT_GLUE_MEDIA_VIDEO_RENDERER_IMPL_H_ |
| OLD | NEW |