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

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

Issue 2851193002: cc: Rename LayerImpl::is_drawn_render_surface_layer_list_member (Closed)
Patch Set: Rebase Created 3 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/layer_impl.cc ('k') | cc/layers/picture_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 1396
1397 WhichTree PictureLayerImpl::GetTree() const { 1397 WhichTree PictureLayerImpl::GetTree() const {
1398 return layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE; 1398 return layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE;
1399 } 1399 }
1400 1400
1401 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1401 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1402 return !layer_tree_impl()->IsRecycleTree(); 1402 return !layer_tree_impl()->IsRecycleTree();
1403 } 1403 }
1404 1404
1405 bool PictureLayerImpl::HasValidTilePriorities() const { 1405 bool PictureLayerImpl::HasValidTilePriorities() const {
1406 return IsOnActiveOrPendingTree() && 1406 return IsOnActiveOrPendingTree() && (contributes_to_drawn_render_surface() ||
1407 (is_drawn_render_surface_layer_list_member() || 1407 raster_even_if_not_in_rsll());
1408 raster_even_if_not_in_rsll());
1409 } 1408 }
1410 1409
1411 void PictureLayerImpl::InvalidateRegionForImages( 1410 void PictureLayerImpl::InvalidateRegionForImages(
1412 const ImageIdFlatSet& images_to_invalidate) { 1411 const ImageIdFlatSet& images_to_invalidate) {
1413 TRACE_EVENT_BEGIN0("cc", "PictureLayerImpl::InvalidateRegionForImages"); 1412 TRACE_EVENT_BEGIN0("cc", "PictureLayerImpl::InvalidateRegionForImages");
1414 1413
1415 InvalidationRegion image_invalidation; 1414 InvalidationRegion image_invalidation;
1416 for (auto image_id : images_to_invalidate) 1415 for (auto image_id : images_to_invalidate)
1417 image_invalidation.Union(raster_source_->GetRectForImage(image_id)); 1416 image_invalidation.Union(raster_source_->GetRectForImage(image_id));
1418 Region invalidation; 1417 Region invalidation;
1419 image_invalidation.Swap(&invalidation); 1418 image_invalidation.Swap(&invalidation);
1420 1419
1421 if (invalidation.IsEmpty()) { 1420 if (invalidation.IsEmpty()) {
1422 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages", 1421 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages",
1423 "Invalidation", invalidation.ToString()); 1422 "Invalidation", invalidation.ToString());
1424 return; 1423 return;
1425 } 1424 }
1426 1425
1427 invalidation_.Union(invalidation); 1426 invalidation_.Union(invalidation);
1428 tilings_->UpdateTilingsForImplSideInvalidation(invalidation); 1427 tilings_->UpdateTilingsForImplSideInvalidation(invalidation);
1429 SetNeedsPushProperties(); 1428 SetNeedsPushProperties();
1430 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages", 1429 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages",
1431 "Invalidation", invalidation.ToString()); 1430 "Invalidation", invalidation.ToString());
1432 } 1431 }
1433 1432
1434 } // namespace cc 1433 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698