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

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

Issue 1051993002: cc: Remove tile sharing from tilings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 years, 8 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
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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 // |invalidation_| gives the invalidation contained in the source frame, but 623 // |invalidation_| gives the invalidation contained in the source frame, but
624 // is not cleared after drawing from the layer. However, update_rect() is 624 // is not cleared after drawing from the layer. However, update_rect() is
625 // cleared once the invalidation is drawn, which is useful for debugging 625 // cleared once the invalidation is drawn, which is useful for debugging
626 // visualizations. This method intersects the two to give a more exact 626 // visualizations. This method intersects the two to give a more exact
627 // representation of what was invalidated that is cleared after drawing. 627 // representation of what was invalidated that is cleared after drawing.
628 return IntersectRegions(invalidation_, update_rect()); 628 return IntersectRegions(invalidation_, update_rect());
629 } 629 }
630 630
631 scoped_refptr<Tile> PictureLayerImpl::CreateTile( 631 scoped_refptr<Tile> PictureLayerImpl::CreateTile(
632 float contents_scale, 632 float contents_scale,
633 const gfx::Rect& content_rect) { 633 const gfx::Rect& content_rect,
634 scoped_refptr<RasterSource>* raster_source) {
enne (OOO) 2015/04/20 22:36:28 Pointer to a refptr <_< Is this something that ne
vmpstr 2015/04/22 18:38:57 Done.
634 int flags = 0; 635 int flags = 0;
635 636
636 // We don't handle solid color masks, so we shouldn't bother analyzing those. 637 // We don't handle solid color masks, so we shouldn't bother analyzing those.
637 // Otherwise, always analyze to maximize memory savings. 638 // Otherwise, always analyze to maximize memory savings.
638 if (!is_mask_) 639 if (!is_mask_)
639 flags = Tile::USE_PICTURE_ANALYSIS; 640 flags = Tile::USE_PICTURE_ANALYSIS;
640 641
641 return layer_tree_impl()->tile_manager()->CreateTile( 642 return layer_tree_impl()->tile_manager()->CreateTile(
642 raster_source_.get(), content_rect.size(), content_rect, contents_scale, 643 raster_source, content_rect.size(), content_rect, contents_scale, id(),
643 id(), layer_tree_impl()->source_frame_number(), flags); 644 layer_tree_impl()->source_frame_number(), flags);
644 } 645 }
645 646
646 const Region* PictureLayerImpl::GetPendingInvalidation() { 647 const Region* PictureLayerImpl::GetPendingInvalidation() {
647 if (layer_tree_impl()->IsPendingTree()) 648 if (layer_tree_impl()->IsPendingTree())
648 return &invalidation_; 649 return &invalidation_;
649 if (layer_tree_impl()->IsRecycleTree()) 650 if (layer_tree_impl()->IsRecycleTree())
650 return nullptr; 651 return nullptr;
651 DCHECK(layer_tree_impl()->IsActiveTree()); 652 DCHECK(layer_tree_impl()->IsActiveTree());
652 if (PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer()) 653 if (PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer())
653 return &twin_layer->invalidation_; 654 return &twin_layer->invalidation_;
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 1247
1247 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1248 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1248 return !layer_tree_impl()->IsRecycleTree(); 1249 return !layer_tree_impl()->IsRecycleTree();
1249 } 1250 }
1250 1251
1251 bool PictureLayerImpl::HasValidTilePriorities() const { 1252 bool PictureLayerImpl::HasValidTilePriorities() const {
1252 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1253 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1253 } 1254 }
1254 1255
1255 } // namespace cc 1256 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698