| 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 scale.Scale(tex_width_scale, tex_height_scale); | 325 scale.Scale(tex_width_scale, tex_height_scale); |
| 326 StreamVideoDrawQuad* stream_video_quad = | 326 StreamVideoDrawQuad* stream_video_quad = |
| 327 render_pass->CreateAndAppendDrawQuad<StreamVideoDrawQuad>(); | 327 render_pass->CreateAndAppendDrawQuad<StreamVideoDrawQuad>(); |
| 328 stream_video_quad->SetNew( | 328 stream_video_quad->SetNew( |
| 329 shared_quad_state, quad_rect, opaque_rect, visible_quad_rect, | 329 shared_quad_state, quad_rect, opaque_rect, visible_quad_rect, |
| 330 frame_resources_[0].id, frame_resources_[0].size_in_pixels, | 330 frame_resources_[0].id, frame_resources_[0].size_in_pixels, |
| 331 scale * provider_client_impl_->StreamTextureMatrix()); | 331 scale * provider_client_impl_->StreamTextureMatrix()); |
| 332 ValidateQuadResources(stream_video_quad); | 332 ValidateQuadResources(stream_video_quad); |
| 333 break; | 333 break; |
| 334 } | 334 } |
| 335 case VideoFrameExternalResources::IO_SURFACE: { | |
| 336 DCHECK_EQ(frame_resources_.size(), 1u); | |
| 337 if (frame_resources_.size() < 1u) | |
| 338 break; | |
| 339 IOSurfaceDrawQuad* io_surface_quad = | |
| 340 render_pass->CreateAndAppendDrawQuad<IOSurfaceDrawQuad>(); | |
| 341 io_surface_quad->SetNew(shared_quad_state, quad_rect, opaque_rect, | |
| 342 visible_quad_rect, visible_rect.size(), | |
| 343 frame_resources_[0].id, | |
| 344 IOSurfaceDrawQuad::UNFLIPPED); | |
| 345 ValidateQuadResources(io_surface_quad); | |
| 346 break; | |
| 347 } | |
| 348 #if defined(VIDEO_HOLE) | 335 #if defined(VIDEO_HOLE) |
| 349 // This block and other blocks wrapped around #if defined(VIDEO_HOLE) is not | 336 // This block and other blocks wrapped around #if defined(VIDEO_HOLE) is not |
| 350 // maintained by the general compositor team. Please contact the following | 337 // maintained by the general compositor team. Please contact the following |
| 351 // people instead: | 338 // people instead: |
| 352 // | 339 // |
| 353 // wonsik@chromium.org | 340 // wonsik@chromium.org |
| 354 // lcwu@chromium.org | 341 // lcwu@chromium.org |
| 355 case VideoFrameExternalResources::HOLE: { | 342 case VideoFrameExternalResources::HOLE: { |
| 356 DCHECK_EQ(frame_resources_.size(), 0u); | 343 DCHECK_EQ(frame_resources_.size(), 0u); |
| 357 SolidColorDrawQuad* solid_color_draw_quad = | 344 SolidColorDrawQuad* solid_color_draw_quad = |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 void VideoLayerImpl::SetNeedsRedraw() { | 405 void VideoLayerImpl::SetNeedsRedraw() { |
| 419 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); | 406 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); |
| 420 layer_tree_impl()->SetNeedsRedraw(); | 407 layer_tree_impl()->SetNeedsRedraw(); |
| 421 } | 408 } |
| 422 | 409 |
| 423 const char* VideoLayerImpl::LayerTypeAsString() const { | 410 const char* VideoLayerImpl::LayerTypeAsString() const { |
| 424 return "cc::VideoLayerImpl"; | 411 return "cc::VideoLayerImpl"; |
| 425 } | 412 } |
| 426 | 413 |
| 427 } // namespace cc | 414 } // namespace cc |
| OLD | NEW |