| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "cc/layers/quad_sink.h" | 9 #include "cc/layers/quad_sink.h" |
| 10 #include "cc/layers/video_frame_provider_client_impl.h" | 10 #include "cc/layers/video_frame_provider_client_impl.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 visible_quad_rect, | 233 visible_quad_rect, |
| 234 frame_resources_[0], | 234 frame_resources_[0], |
| 235 scale * provider_client_impl_->stream_texture_matrix()); | 235 scale * provider_client_impl_->stream_texture_matrix()); |
| 236 quad_sink->Append(stream_video_quad.PassAs<DrawQuad>()); | 236 quad_sink->Append(stream_video_quad.PassAs<DrawQuad>()); |
| 237 break; | 237 break; |
| 238 } | 238 } |
| 239 case VideoFrameExternalResources::IO_SURFACE: { | 239 case VideoFrameExternalResources::IO_SURFACE: { |
| 240 DCHECK_EQ(frame_resources_.size(), 1u); | 240 DCHECK_EQ(frame_resources_.size(), 1u); |
| 241 if (frame_resources_.size() < 1u) | 241 if (frame_resources_.size() < 1u) |
| 242 break; | 242 break; |
| 243 gfx::Size visible_size(visible_rect.width(), visible_rect.height()); | |
| 244 scoped_ptr<IOSurfaceDrawQuad> io_surface_quad = | 243 scoped_ptr<IOSurfaceDrawQuad> io_surface_quad = |
| 245 IOSurfaceDrawQuad::Create(); | 244 IOSurfaceDrawQuad::Create(); |
| 246 io_surface_quad->SetNew(shared_quad_state, | 245 io_surface_quad->SetNew(shared_quad_state, |
| 247 quad_rect, | 246 quad_rect, |
| 248 opaque_rect, | 247 opaque_rect, |
| 249 visible_quad_rect, | 248 visible_quad_rect, |
| 250 visible_size, | 249 visible_rect.size(), |
| 251 frame_resources_[0], | 250 frame_resources_[0], |
| 252 IOSurfaceDrawQuad::UNFLIPPED); | 251 IOSurfaceDrawQuad::UNFLIPPED); |
| 253 quad_sink->Append(io_surface_quad.PassAs<DrawQuad>()); | 252 quad_sink->Append(io_surface_quad.PassAs<DrawQuad>()); |
| 254 break; | 253 break; |
| 255 } | 254 } |
| 256 #if defined(VIDEO_HOLE) | 255 #if defined(VIDEO_HOLE) |
| 257 // This block and other blocks wrapped around #if defined(GOOGLE_TV) is not | 256 // This block and other blocks wrapped around #if defined(GOOGLE_TV) is not |
| 258 // maintained by the general compositor team. Please contact the following | 257 // maintained by the general compositor team. Please contact the following |
| 259 // people instead: | 258 // people instead: |
| 260 // | 259 // |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 void VideoLayerImpl::SetProviderClientImpl( | 320 void VideoLayerImpl::SetProviderClientImpl( |
| 322 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) { | 321 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) { |
| 323 provider_client_impl_ = provider_client_impl; | 322 provider_client_impl_ = provider_client_impl; |
| 324 } | 323 } |
| 325 | 324 |
| 326 const char* VideoLayerImpl::LayerTypeAsString() const { | 325 const char* VideoLayerImpl::LayerTypeAsString() const { |
| 327 return "cc::VideoLayerImpl"; | 326 return "cc::VideoLayerImpl"; |
| 328 } | 327 } |
| 329 | 328 |
| 330 } // namespace cc | 329 } // namespace cc |
| OLD | NEW |