OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #if USE(ACCELERATED_COMPOSITING) | 7 #if USE(ACCELERATED_COMPOSITING) |
8 #include "VideoLayerChromium.h" | 8 #include "VideoLayerChromium.h" |
9 | 9 |
10 #include "CCVideoLayerImpl.h" | 10 #include "CCVideoLayerImpl.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 | 13 |
14 scoped_refptr<VideoLayerChromium> VideoLayerChromium::create(WebKit::WebVideoFra
meProvider* provider) | 14 scoped_refptr<VideoLayerChromium> VideoLayerChromium::create(WebKit::WebVideoFra
meProvider* provider) |
15 { | 15 { |
16 return make_scoped_refptr(new VideoLayerChromium(provider)); | 16 return make_scoped_refptr(new VideoLayerChromium(provider)); |
17 } | 17 } |
18 | 18 |
19 VideoLayerChromium::VideoLayerChromium(WebKit::WebVideoFrameProvider* provider) | 19 VideoLayerChromium::VideoLayerChromium(WebKit::WebVideoFrameProvider* provider) |
20 : LayerChromium() | 20 : LayerChromium() |
21 , m_provider(provider) | 21 , m_provider(provider) |
22 { | 22 { |
23 ASSERT(m_provider); | 23 ASSERT(m_provider); |
24 } | 24 } |
25 | 25 |
26 VideoLayerChromium::~VideoLayerChromium() | 26 VideoLayerChromium::~VideoLayerChromium() |
27 { | 27 { |
28 } | 28 } |
29 | 29 |
30 PassOwnPtr<CCLayerImpl> VideoLayerChromium::createCCLayerImpl() | 30 scoped_ptr<CCLayerImpl> VideoLayerChromium::createCCLayerImpl() |
31 { | 31 { |
32 return CCVideoLayerImpl::create(m_layerId, m_provider); | 32 return CCVideoLayerImpl::create(m_layerId, m_provider).PassAs<CCLayerImpl>()
; |
33 } | 33 } |
34 | 34 |
35 } // namespace cc | 35 } // namespace cc |
36 | 36 |
37 #endif // USE(ACCELERATED_COMPOSITING) | 37 #endif // USE(ACCELERATED_COMPOSITING) |
OLD | NEW |