Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: cc/layers/video_layer_impl.cc

Issue 1134663005: cc: Video layers without a frame should not occlude (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed const on android Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/video_layer_impl.h ('k') | cc/layers/video_layer_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/video_frame_provider_client_impl.h" 9 #include "cc/layers/video_frame_provider_client_impl.h"
10 #include "cc/quads/io_surface_draw_quad.h" 10 #include "cc/quads/io_surface_draw_quad.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 resource_provider->DeleteResource(frame_resources_[i]); 371 resource_provider->DeleteResource(frame_resources_[i]);
372 frame_resources_.clear(); 372 frame_resources_.clear();
373 } 373 }
374 374
375 provider_client_impl_->PutCurrentFrame(); 375 provider_client_impl_->PutCurrentFrame();
376 frame_ = nullptr; 376 frame_ = nullptr;
377 377
378 provider_client_impl_->ReleaseLock(); 378 provider_client_impl_->ReleaseLock();
379 } 379 }
380 380
381 SimpleEnclosedRegion VideoLayerImpl::VisibleContentOpaqueRegion() const {
382 // If we don't have a frame yet, then we don't have an opaque region.
383 if (!provider_client_impl_->HasCurrentFrame())
384 return SimpleEnclosedRegion();
385 return LayerImpl::VisibleContentOpaqueRegion();
386 }
387
381 void VideoLayerImpl::ReleaseResources() { 388 void VideoLayerImpl::ReleaseResources() {
382 updater_ = nullptr; 389 updater_ = nullptr;
383 } 390 }
384 391
385 void VideoLayerImpl::SetNeedsRedraw() { 392 void VideoLayerImpl::SetNeedsRedraw() {
386 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); 393 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds())));
387 layer_tree_impl()->SetNeedsRedraw(); 394 layer_tree_impl()->SetNeedsRedraw();
388 } 395 }
389 396
390 const char* VideoLayerImpl::LayerTypeAsString() const { 397 const char* VideoLayerImpl::LayerTypeAsString() const {
391 return "cc::VideoLayerImpl"; 398 return "cc::VideoLayerImpl";
392 } 399 }
393 400
394 } // namespace cc 401 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/video_layer_impl.h ('k') | cc/layers/video_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698