| 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 #include "webkit/glue/media/video_renderer_impl.h" | 5 #include "webkit/glue/media/video_renderer_impl.h" | 
| 6 | 6 | 
| 7 #include "media/base/video_frame.h" | 7 #include "media/base/video_frame.h" | 
| 8 #include "media/base/yuv_convert.h" | 8 #include "media/base/yuv_convert.h" | 
| 9 #include "webkit/glue/webmediaplayer_impl.h" | 9 #include "webkit/glue/webmediaplayer_impl.h" | 
| 10 | 10 | 
| 11 namespace webkit_glue { | 11 namespace webkit_glue { | 
| 12 | 12 | 
| 13 VideoRendererImpl::VideoRendererImpl(WebMediaPlayerImpl::Proxy* proxy, | 13 VideoRendererImpl::VideoRendererImpl(WebMediaPlayerImpl::Proxy* proxy, | 
| 14                                      bool pts_logging) | 14                                      bool pts_logging) | 
| 15     : proxy_(proxy), | 15     : proxy_(proxy), | 
| 16       last_converted_frame_(NULL), | 16       last_converted_frame_(NULL), | 
| 17       pts_logging_(pts_logging) { | 17       pts_logging_(pts_logging) { | 
| 18   // TODO(hclam): decide whether to do the following line in this thread or | 18   // TODO(hclam): decide whether to do the following line in this thread or | 
| 19   // in the render thread. | 19   // in the render thread. | 
| 20   proxy_->SetVideoRenderer(this); | 20   proxy_->SetVideoRenderer(this); | 
| 21 } | 21 } | 
| 22 | 22 | 
|  | 23 VideoRendererImpl::~VideoRendererImpl() {} | 
|  | 24 | 
| 23 // static | 25 // static | 
| 24 media::FilterFactory* VideoRendererImpl::CreateFactory( | 26 media::FilterFactory* VideoRendererImpl::CreateFactory( | 
| 25     WebMediaPlayerImpl::Proxy* proxy, | 27     WebMediaPlayerImpl::Proxy* proxy, | 
| 26     bool pts_logging) { | 28     bool pts_logging) { | 
| 27   return new media::FilterFactoryImpl2<VideoRendererImpl, | 29   return new media::FilterFactoryImpl2<VideoRendererImpl, | 
| 28                                        WebMediaPlayerImpl::Proxy*, | 30                                        WebMediaPlayerImpl::Proxy*, | 
| 29                                        bool>(proxy, pts_logging); | 31                                        bool>(proxy, pts_logging); | 
| 30 } | 32 } | 
| 31 | 33 | 
| 32 // static | 34 // static | 
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 322     // Transform destination rect to local coordinates. | 324     // Transform destination rect to local coordinates. | 
| 323     SkRect transformed_rect; | 325     SkRect transformed_rect; | 
| 324     SkRect skia_dest_rect; | 326     SkRect skia_dest_rect; | 
| 325     skia_dest_rect.iset(src_rect.x(), src_rect.y(), | 327     skia_dest_rect.iset(src_rect.x(), src_rect.y(), | 
| 326                         src_rect.right(), src_rect.bottom()); | 328                         src_rect.right(), src_rect.bottom()); | 
| 327     matrix.mapRect(&transformed_rect, skia_dest_rect); | 329     matrix.mapRect(&transformed_rect, skia_dest_rect); | 
| 328     transformed_rect.round(dest_rect); | 330     transformed_rect.round(dest_rect); | 
| 329 } | 331 } | 
| 330 | 332 | 
| 331 }  // namespace webkit_glue | 333 }  // namespace webkit_glue | 
| OLD | NEW | 
|---|