| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "cc/layers/video_layer_impl.h" | 5 #include "cc/layers/video_layer_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "cc/layers/video_frame_provider_client_impl.h" | 9 #include "cc/layers/video_frame_provider_client_impl.h" |
| 10 #include "cc/quads/io_surface_draw_quad.h" | 10 #include "cc/quads/io_surface_draw_quad.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // static | 27 // static |
| 28 scoped_ptr<VideoLayerImpl> VideoLayerImpl::Create( | 28 scoped_ptr<VideoLayerImpl> VideoLayerImpl::Create( |
| 29 LayerTreeImpl* tree_impl, | 29 LayerTreeImpl* tree_impl, |
| 30 int id, | 30 int id, |
| 31 VideoFrameProvider* provider, | 31 VideoFrameProvider* provider, |
| 32 media::VideoRotation video_rotation) { | 32 media::VideoRotation video_rotation) { |
| 33 DCHECK(tree_impl->proxy()->IsMainThreadBlocked()); | 33 DCHECK(tree_impl->proxy()->IsMainThreadBlocked()); |
| 34 DCHECK(tree_impl->proxy()->IsImplThread()); | 34 DCHECK(tree_impl->proxy()->IsImplThread()); |
| 35 | 35 |
| 36 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl = | 36 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl = |
| 37 VideoFrameProviderClientImpl::Create(provider); | 37 VideoFrameProviderClientImpl::Create( |
| 38 provider, tree_impl->GetVideoFrameControllerClient()); |
| 38 | 39 |
| 39 return make_scoped_ptr( | 40 return make_scoped_ptr( |
| 40 new VideoLayerImpl(tree_impl, id, provider_client_impl, video_rotation)); | 41 new VideoLayerImpl(tree_impl, id, provider_client_impl, video_rotation)); |
| 41 } | 42 } |
| 42 | 43 |
| 43 VideoLayerImpl::VideoLayerImpl( | 44 VideoLayerImpl::VideoLayerImpl( |
| 44 LayerTreeImpl* tree_impl, | 45 LayerTreeImpl* tree_impl, |
| 45 int id, | 46 int id, |
| 46 const scoped_refptr<VideoFrameProviderClientImpl>& provider_client_impl, | 47 const scoped_refptr<VideoFrameProviderClientImpl>& provider_client_impl, |
| 47 media::VideoRotation video_rotation) | 48 media::VideoRotation video_rotation) |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 void VideoLayerImpl::SetNeedsRedraw() { | 394 void VideoLayerImpl::SetNeedsRedraw() { |
| 394 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); | 395 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); |
| 395 layer_tree_impl()->SetNeedsRedraw(); | 396 layer_tree_impl()->SetNeedsRedraw(); |
| 396 } | 397 } |
| 397 | 398 |
| 398 const char* VideoLayerImpl::LayerTypeAsString() const { | 399 const char* VideoLayerImpl::LayerTypeAsString() const { |
| 399 return "cc::VideoLayerImpl"; | 400 return "cc::VideoLayerImpl"; |
| 400 } | 401 } |
| 401 | 402 |
| 402 } // namespace cc | 403 } // namespace cc |
| OLD | NEW |