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

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

Issue 2612413003: Clean up tile deletion (Closed)
Patch Set: "Fix Tile* comparison in tests" Created 3 years, 11 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/picture_layer_impl.h ('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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 684
685 Region PictureLayerImpl::GetInvalidationRegionForDebugging() { 685 Region PictureLayerImpl::GetInvalidationRegionForDebugging() {
686 // |invalidation_| gives the invalidation contained in the source frame, but 686 // |invalidation_| gives the invalidation contained in the source frame, but
687 // is not cleared after drawing from the layer. However, update_rect() is 687 // is not cleared after drawing from the layer. However, update_rect() is
688 // cleared once the invalidation is drawn, which is useful for debugging 688 // cleared once the invalidation is drawn, which is useful for debugging
689 // visualizations. This method intersects the two to give a more exact 689 // visualizations. This method intersects the two to give a more exact
690 // representation of what was invalidated that is cleared after drawing. 690 // representation of what was invalidated that is cleared after drawing.
691 return IntersectRegions(invalidation_, update_rect()); 691 return IntersectRegions(invalidation_, update_rect());
692 } 692 }
693 693
694 ScopedTilePtr PictureLayerImpl::CreateTile(const Tile::CreateInfo& info) { 694 std::unique_ptr<Tile> PictureLayerImpl::CreateTile(
695 const Tile::CreateInfo& info) {
695 int flags = 0; 696 int flags = 0;
696 697
697 // We don't handle solid color masks, so we shouldn't bother analyzing those. 698 // We don't handle solid color masks, so we shouldn't bother analyzing those.
698 // Otherwise, always analyze to maximize memory savings. 699 // Otherwise, always analyze to maximize memory savings.
699 if (!is_mask_) 700 if (!is_mask_)
700 flags = Tile::USE_PICTURE_ANALYSIS; 701 flags = Tile::USE_PICTURE_ANALYSIS;
701 702
702 if (contents_opaque()) 703 if (contents_opaque())
703 flags |= Tile::IS_OPAQUE; 704 flags |= Tile::IS_OPAQUE;
704 705
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1367 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1367 return !layer_tree_impl()->IsRecycleTree(); 1368 return !layer_tree_impl()->IsRecycleTree();
1368 } 1369 }
1369 1370
1370 bool PictureLayerImpl::HasValidTilePriorities() const { 1371 bool PictureLayerImpl::HasValidTilePriorities() const {
1371 return IsOnActiveOrPendingTree() && 1372 return IsOnActiveOrPendingTree() &&
1372 is_drawn_render_surface_layer_list_member(); 1373 is_drawn_render_surface_layer_list_member();
1373 } 1374 }
1374 1375
1375 } // namespace cc 1376 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698