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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "cc/video_layer_impl.h" | 7 #include "cc/video_layer_impl.h" |
8 | 8 |
9 #include "NotImplemented.h" | 9 #include "NotImplemented.h" |
10 #include "cc/io_surface_draw_quad.h" | 10 #include "cc/io_surface_draw_quad.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 if (!m_frame) | 159 if (!m_frame) |
160 return; | 160 return; |
161 | 161 |
162 SharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createSharedQ
uadState()); | 162 SharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createSharedQ
uadState()); |
163 appendDebugBorderQuad(quadSink, sharedQuadState, appendQuadsData); | 163 appendDebugBorderQuad(quadSink, sharedQuadState, appendQuadsData); |
164 | 164 |
165 // FIXME: When we pass quads out of process, we need to double-buffer, or | 165 // FIXME: When we pass quads out of process, we need to double-buffer, or |
166 // otherwise synchonize use of all textures in the quad. | 166 // otherwise synchonize use of all textures in the quad. |
167 | 167 |
168 IntRect quadRect(IntPoint(), contentBounds()); | 168 gfx::Rect quadRect(gfx::Point(), contentBounds()); |
169 | 169 |
170 switch (m_format) { | 170 switch (m_format) { |
171 case GL_LUMINANCE: { | 171 case GL_LUMINANCE: { |
172 // YUV software decoder. | 172 // YUV software decoder. |
173 const FramePlane& yPlane = m_framePlanes[WebKit::WebVideoFrame::yPlane]; | 173 const FramePlane& yPlane = m_framePlanes[WebKit::WebVideoFrame::yPlane]; |
174 const FramePlane& uPlane = m_framePlanes[WebKit::WebVideoFrame::uPlane]; | 174 const FramePlane& uPlane = m_framePlanes[WebKit::WebVideoFrame::uPlane]; |
175 const FramePlane& vPlane = m_framePlanes[WebKit::WebVideoFrame::vPlane]; | 175 const FramePlane& vPlane = m_framePlanes[WebKit::WebVideoFrame::vPlane]; |
176 scoped_ptr<YUVVideoDrawQuad> yuvVideoQuad = YUVVideoDrawQuad::create(sha
redQuadState, quadRect, yPlane, uPlane, vPlane); | 176 scoped_ptr<YUVVideoDrawQuad> yuvVideoQuad = YUVVideoDrawQuad::create(sha
redQuadState, quadRect, yPlane, uPlane, vPlane); |
177 quadSink.append(yuvVideoQuad.PassAs<DrawQuad>(), appendQuadsData); | 177 quadSink.append(yuvVideoQuad.PassAs<DrawQuad>(), appendQuadsData); |
178 break; | 178 break; |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 str->append("video layer\n"); | 378 str->append("video layer\n"); |
379 LayerImpl::dumpLayerProperties(str, indent); | 379 LayerImpl::dumpLayerProperties(str, indent); |
380 } | 380 } |
381 | 381 |
382 const char* VideoLayerImpl::layerTypeAsString() const | 382 const char* VideoLayerImpl::layerTypeAsString() const |
383 { | 383 { |
384 return "VideoLayer"; | 384 return "VideoLayer"; |
385 } | 385 } |
386 | 386 |
387 } | 387 } |
OLD | NEW |