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

Side by Side Diff: cc/resources/picture_layer_tiling.cc

Issue 1041893003: cc: Separate tiling set functionality into explicit separate functions. (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
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/picture_layer_tiling_set.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/resources/picture_layer_tiling.h" 5 #include "cc/resources/picture_layer_tiling.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 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 } 845 }
846 846
847 // Non-NOW bin tiles are not required or occluded. 847 // Non-NOW bin tiles are not required or occluded.
848 if (tree == PENDING_TREE) 848 if (tree == PENDING_TREE)
849 tile->set_required_for_activation(false); 849 tile->set_required_for_activation(false);
850 else 850 else
851 tile->set_required_for_draw(false); 851 tile->set_required_for_draw(false);
852 tile->set_is_occluded(tree, false); 852 tile->set_is_occluded(tree, false);
853 } 853 }
854 854
855 void PictureLayerTiling::VerifyAllTilesHaveCurrentRasterSource() const {
856 #if DCHECK_IS_ON()
857 for (const auto& tile_pair : tiles_)
858 DCHECK_EQ(raster_source_.get(), tile_pair.second->raster_source());
859 #endif
860 }
861
855 TilePriority PictureLayerTiling::ComputePriorityForTile( 862 TilePriority PictureLayerTiling::ComputePriorityForTile(
856 const Tile* tile) const { 863 const Tile* tile) const {
857 // TODO(vmpstr): See if this can be moved to iterators. 864 // TODO(vmpstr): See if this can be moved to iterators.
858 TilePriority::PriorityBin max_tile_priority_bin = 865 TilePriority::PriorityBin max_tile_priority_bin =
859 client_->GetMaxTilePriorityBin(); 866 client_->GetMaxTilePriorityBin();
860 867
861 DCHECK_EQ(TileAt(tile->tiling_i_index(), tile->tiling_j_index()), tile); 868 DCHECK_EQ(TileAt(tile->tiling_i_index(), tile->tiling_j_index()), tile);
862 gfx::Rect tile_bounds = 869 gfx::Rect tile_bounds =
863 tiling_data_.TileBounds(tile->tiling_i_index(), tile->tiling_j_index()); 870 tiling_data_.TileBounds(tile->tiling_i_index(), tile->tiling_j_index());
864 871
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 break; 1071 break;
1065 } 1072 }
1066 1073
1067 gfx::Rect result(origin_x, origin_y, width, height); 1074 gfx::Rect result(origin_x, origin_y, width, height);
1068 if (cache) 1075 if (cache)
1069 cache->previous_result = result; 1076 cache->previous_result = result;
1070 return result; 1077 return result;
1071 } 1078 }
1072 1079
1073 } // namespace cc 1080 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/picture_layer_tiling_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698