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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 break; | 312 break; |
313 } | 313 } |
314 case VideoFrameExternalResources::STREAM_TEXTURE_RESOURCE: { | 314 case VideoFrameExternalResources::STREAM_TEXTURE_RESOURCE: { |
315 DCHECK_EQ(frame_resources_.size(), 1u); | 315 DCHECK_EQ(frame_resources_.size(), 1u); |
316 if (frame_resources_.size() < 1u) | 316 if (frame_resources_.size() < 1u) |
317 break; | 317 break; |
318 gfx::Transform scale; | 318 gfx::Transform scale; |
319 scale.Scale(tex_width_scale, tex_height_scale); | 319 scale.Scale(tex_width_scale, tex_height_scale); |
320 StreamVideoDrawQuad* stream_video_quad = | 320 StreamVideoDrawQuad* stream_video_quad = |
321 render_pass->CreateAndAppendDrawQuad<StreamVideoDrawQuad>(); | 321 render_pass->CreateAndAppendDrawQuad<StreamVideoDrawQuad>(); |
322 stream_video_quad->SetNew( | 322 stream_video_quad->SetNew(shared_quad_state, quad_rect, opaque_rect, |
323 shared_quad_state, quad_rect, opaque_rect, visible_quad_rect, | 323 visible_quad_rect, frame_resources_[0].id, |
324 frame_resources_[0].id, frame_resources_[0].size_in_pixels, | 324 frame_resources_[0].size_in_pixels, scale); |
325 scale * provider_client_impl_->StreamTextureMatrix()); | |
326 ValidateQuadResources(stream_video_quad); | 325 ValidateQuadResources(stream_video_quad); |
327 break; | 326 break; |
328 } | 327 } |
329 #if defined(VIDEO_HOLE) | 328 #if defined(VIDEO_HOLE) |
330 // This block and other blocks wrapped around #if defined(VIDEO_HOLE) is not | 329 // This block and other blocks wrapped around #if defined(VIDEO_HOLE) is not |
331 // maintained by the general compositor team. Please contact the following | 330 // maintained by the general compositor team. Please contact the following |
332 // people instead: | 331 // people instead: |
333 // | 332 // |
334 // wonsik@chromium.org | 333 // wonsik@chromium.org |
335 // lcwu@chromium.org | 334 // lcwu@chromium.org |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 void VideoLayerImpl::SetNeedsRedraw() { | 398 void VideoLayerImpl::SetNeedsRedraw() { |
400 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); | 399 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); |
401 layer_tree_impl()->SetNeedsRedraw(); | 400 layer_tree_impl()->SetNeedsRedraw(); |
402 } | 401 } |
403 | 402 |
404 const char* VideoLayerImpl::LayerTypeAsString() const { | 403 const char* VideoLayerImpl::LayerTypeAsString() const { |
405 return "cc::VideoLayerImpl"; | 404 return "cc::VideoLayerImpl"; |
406 } | 405 } |
407 | 406 |
408 } // namespace cc | 407 } // namespace cc |
OLD | NEW |