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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 resource_provider->DeleteResource(frame_resources_[i]); | 290 resource_provider->DeleteResource(frame_resources_[i]); |
291 frame_resources_.clear(); | 291 frame_resources_.clear(); |
292 } | 292 } |
293 | 293 |
294 provider_client_impl_->PutCurrentFrame(frame_); | 294 provider_client_impl_->PutCurrentFrame(frame_); |
295 frame_ = NULL; | 295 frame_ = NULL; |
296 | 296 |
297 provider_client_impl_->ReleaseLock(); | 297 provider_client_impl_->ReleaseLock(); |
298 } | 298 } |
299 | 299 |
300 void VideoLayerImpl::DidLoseOutputSurface() { | 300 void VideoLayerImpl::ReleaseResources() { |
301 updater_.reset(); | 301 updater_.reset(); |
302 } | 302 } |
303 | 303 |
304 void VideoLayerImpl::SetNeedsRedraw() { | 304 void VideoLayerImpl::SetNeedsRedraw() { |
305 set_update_rect(gfx::UnionRects(update_rect(), gfx::RectF(bounds()))); | 305 set_update_rect(gfx::UnionRects(update_rect(), gfx::RectF(bounds()))); |
306 layer_tree_impl()->SetNeedsRedraw(); | 306 layer_tree_impl()->SetNeedsRedraw(); |
307 } | 307 } |
308 | 308 |
309 void VideoLayerImpl::SetProviderClientImpl( | 309 void VideoLayerImpl::SetProviderClientImpl( |
310 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) { | 310 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) { |
311 provider_client_impl_ = provider_client_impl; | 311 provider_client_impl_ = provider_client_impl; |
312 } | 312 } |
313 | 313 |
314 const char* VideoLayerImpl::LayerTypeAsString() const { | 314 const char* VideoLayerImpl::LayerTypeAsString() const { |
315 return "cc::VideoLayerImpl"; | 315 return "cc::VideoLayerImpl"; |
316 } | 316 } |
317 | 317 |
318 } // namespace cc | 318 } // namespace cc |
OLD | NEW |