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/video_layer_impl.h" | 5 #include "cc/video_layer_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "cc/io_surface_draw_quad.h" | 8 #include "cc/io_surface_draw_quad.h" |
9 #include "cc/layer_tree_host_impl.h" | 9 #include "cc/layer_tree_host_impl.h" |
10 #include "cc/math_util.h" | 10 #include "cc/math_util.h" |
11 #include "cc/quad_sink.h" | 11 #include "cc/quad_sink.h" |
12 #include "cc/resource_provider.h" | 12 #include "cc/resource_provider.h" |
13 #include "cc/stream_video_draw_quad.h" | 13 #include "cc/stream_video_draw_quad.h" |
14 #include "cc/texture_draw_quad.h" | 14 #include "cc/texture_draw_quad.h" |
15 #include "cc/yuv_video_draw_quad.h" | 15 #include "cc/yuv_video_draw_quad.h" |
16 #include "media/filters/skcanvas_video_renderer.h" | 16 #include "media/filters/skcanvas_video_renderer.h" |
17 #include "third_party/khronos/GLES2/gl2.h" | 17 #include "third_party/khronos/GLES2/gl2.h" |
18 #include "third_party/khronos/GLES2/gl2ext.h" | 18 #include "third_party/khronos/GLES2/gl2ext.h" |
19 | 19 |
20 namespace cc { | 20 namespace cc { |
21 | 21 |
22 VideoLayerImpl::VideoLayerImpl(int id, WebKit::WebVideoFrameProvider* provider, | 22 VideoLayerImpl::VideoLayerImpl(LayerTreeHostImpl* hostImpl, int id, WebKit::WebV
ideoFrameProvider* provider, |
23 const FrameUnwrapper& unwrapper) | 23 const FrameUnwrapper& unwrapper) |
24 : LayerImpl(id) | 24 : LayerImpl(hostImpl, id) |
25 , m_provider(provider) | 25 , m_provider(provider) |
26 , m_unwrapper(unwrapper) | 26 , m_unwrapper(unwrapper) |
27 , m_webFrame(0) | 27 , m_webFrame(0) |
28 , m_frame(0) | 28 , m_frame(0) |
29 , m_format(GL_INVALID_VALUE) | 29 , m_format(GL_INVALID_VALUE) |
30 , m_convertYUV(false) | 30 , m_convertYUV(false) |
31 , m_externalTextureResource(0) | 31 , m_externalTextureResource(0) |
32 { | 32 { |
33 // This matrix is the default transformation for stream textures, and flips
on the Y axis. | 33 // This matrix is the default transformation for stream textures, and flips
on the Y axis. |
34 m_streamTextureMatrix = MathUtil::createGfxTransform( | 34 m_streamTextureMatrix = MathUtil::createGfxTransform( |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 { | 419 { |
420 layerTreeHostImpl()->setNeedsRedraw(); | 420 layerTreeHostImpl()->setNeedsRedraw(); |
421 } | 421 } |
422 | 422 |
423 const char* VideoLayerImpl::layerTypeAsString() const | 423 const char* VideoLayerImpl::layerTypeAsString() const |
424 { | 424 { |
425 return "VideoLayer"; | 425 return "VideoLayer"; |
426 } | 426 } |
427 | 427 |
428 } // namespace cc | 428 } // namespace cc |
OLD | NEW |