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 "base/logging.h" | 9 #include "base/logging.h" |
10 #include "cc/io_surface_draw_quad.h" | 10 #include "cc/io_surface_draw_quad.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 195 |
196 if (!m_frame) | 196 if (!m_frame) |
197 return; | 197 return; |
198 | 198 |
199 SharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createSharedQ
uadState()); | 199 SharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createSharedQ
uadState()); |
200 appendDebugBorderQuad(quadSink, sharedQuadState, appendQuadsData); | 200 appendDebugBorderQuad(quadSink, sharedQuadState, appendQuadsData); |
201 | 201 |
202 // FIXME: When we pass quads out of process, we need to double-buffer, or | 202 // FIXME: When we pass quads out of process, we need to double-buffer, or |
203 // otherwise synchonize use of all textures in the quad. | 203 // otherwise synchonize use of all textures in the quad. |
204 | 204 |
205 gfx::Rect quadRect(contentBounds()); | 205 gfx::Rect quadRect(gfx::Point(), contentBounds()); |
206 | 206 |
207 switch (m_format) { | 207 switch (m_format) { |
208 case GL_LUMINANCE: { | 208 case GL_LUMINANCE: { |
209 // YUV software decoder. | 209 // YUV software decoder. |
210 const FramePlane& yPlane = m_framePlanes[media::VideoFrame::kYPlane]; | 210 const FramePlane& yPlane = m_framePlanes[media::VideoFrame::kYPlane]; |
211 const FramePlane& uPlane = m_framePlanes[media::VideoFrame::kUPlane]; | 211 const FramePlane& uPlane = m_framePlanes[media::VideoFrame::kUPlane]; |
212 const FramePlane& vPlane = m_framePlanes[media::VideoFrame::kVPlane]; | 212 const FramePlane& vPlane = m_framePlanes[media::VideoFrame::kVPlane]; |
213 scoped_ptr<YUVVideoDrawQuad> yuvVideoQuad = YUVVideoDrawQuad::create(sha
redQuadState, quadRect, yPlane, uPlane, vPlane); | 213 scoped_ptr<YUVVideoDrawQuad> yuvVideoQuad = YUVVideoDrawQuad::create(sha
redQuadState, quadRect, yPlane, uPlane, vPlane); |
214 quadSink.append(yuvVideoQuad.PassAs<DrawQuad>(), appendQuadsData); | 214 quadSink.append(yuvVideoQuad.PassAs<DrawQuad>(), appendQuadsData); |
215 break; | 215 break; |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 str->append("video layer\n"); | 424 str->append("video layer\n"); |
425 LayerImpl::dumpLayerProperties(str, indent); | 425 LayerImpl::dumpLayerProperties(str, indent); |
426 } | 426 } |
427 | 427 |
428 const char* VideoLayerImpl::layerTypeAsString() const | 428 const char* VideoLayerImpl::layerTypeAsString() const |
429 { | 429 { |
430 return "VideoLayer"; | 430 return "VideoLayer"; |
431 } | 431 } |
432 | 432 |
433 } | 433 } |
OLD | NEW |