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

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

Issue 1127253002: Revert "cc: Remove Tile refcounting and RefCountedManaged." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/picture_layer_impl.h ('k') | cc/resources/picture_layer_tiling.h » ('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 <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <set> 10 #include <set>
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 611
612 Region PictureLayerImpl::GetInvalidationRegion() { 612 Region PictureLayerImpl::GetInvalidationRegion() {
613 // |invalidation_| gives the invalidation contained in the source frame, but 613 // |invalidation_| gives the invalidation contained in the source frame, but
614 // is not cleared after drawing from the layer. However, update_rect() is 614 // is not cleared after drawing from the layer. However, update_rect() is
615 // cleared once the invalidation is drawn, which is useful for debugging 615 // cleared once the invalidation is drawn, which is useful for debugging
616 // visualizations. This method intersects the two to give a more exact 616 // visualizations. This method intersects the two to give a more exact
617 // representation of what was invalidated that is cleared after drawing. 617 // representation of what was invalidated that is cleared after drawing.
618 return IntersectRegions(invalidation_, update_rect()); 618 return IntersectRegions(invalidation_, update_rect());
619 } 619 }
620 620
621 ScopedTilePtr PictureLayerImpl::CreateTile(float contents_scale, 621 scoped_refptr<Tile> PictureLayerImpl::CreateTile(
622 const gfx::Rect& content_rect) { 622 float contents_scale,
623 const gfx::Rect& content_rect) {
623 int flags = 0; 624 int flags = 0;
624 625
625 // We don't handle solid color masks, so we shouldn't bother analyzing those. 626 // We don't handle solid color masks, so we shouldn't bother analyzing those.
626 // Otherwise, always analyze to maximize memory savings. 627 // Otherwise, always analyze to maximize memory savings.
627 if (!is_mask_) 628 if (!is_mask_)
628 flags = Tile::USE_PICTURE_ANALYSIS; 629 flags = Tile::USE_PICTURE_ANALYSIS;
629 630
630 return layer_tree_impl()->tile_manager()->CreateTile( 631 return layer_tree_impl()->tile_manager()->CreateTile(
631 raster_source_.get(), content_rect.size(), content_rect, contents_scale, 632 raster_source_.get(), content_rect.size(), content_rect, contents_scale,
632 id(), layer_tree_impl()->source_frame_number(), flags); 633 id(), layer_tree_impl()->source_frame_number(), flags);
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 1244
1244 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1245 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1245 return !layer_tree_impl()->IsRecycleTree(); 1246 return !layer_tree_impl()->IsRecycleTree();
1246 } 1247 }
1247 1248
1248 bool PictureLayerImpl::HasValidTilePriorities() const { 1249 bool PictureLayerImpl::HasValidTilePriorities() const {
1249 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1250 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1250 } 1251 }
1251 1252
1252 } // namespace cc 1253 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698