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

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

Issue 1131633003: cc: Use multiple PrepareTiles approaches Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 6 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/tiles/picture_layer_tiling.h ('k') | cc/tiles/tile_manager_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/tiles/picture_layer_tiling.h" 5 #include "cc/tiles/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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 806
807 bool tile_is_visible = current_visible_rect_.Intersects(tile->content_rect()); 807 bool tile_is_visible = current_visible_rect_.Intersects(tile->content_rect());
808 if (!tile_is_visible) 808 if (!tile_is_visible)
809 return false; 809 return false;
810 810
811 if (IsTileOccludedOnCurrentTree(tile)) 811 if (IsTileOccludedOnCurrentTree(tile))
812 return false; 812 return false;
813 return true; 813 return true;
814 } 814 }
815 815
816 bool PictureLayerTiling::RasterSourceCoversCurrentVisibleTiles() const {
817 gfx::Rect visible_rect_expanded_to_tile_bounds =
818 tiling_data_.ExpandRectToTileBounds(current_visible_rect_);
819
820 return raster_source_->CoversRect(visible_rect_expanded_to_tile_bounds,
821 contents_scale_);
822 }
823
816 void PictureLayerTiling::UpdateRequiredStatesOnTile(Tile* tile) const { 824 void PictureLayerTiling::UpdateRequiredStatesOnTile(Tile* tile) const {
817 DCHECK(tile); 825 DCHECK(tile);
818 tile->set_required_for_activation(IsTileRequiredForActivation(tile)); 826 tile->set_required_for_activation(IsTileRequiredForActivation(tile));
819 tile->set_required_for_draw(IsTileRequiredForDraw(tile)); 827 tile->set_required_for_draw(IsTileRequiredForDraw(tile));
820 } 828 }
821 829
822 PrioritizedTile PictureLayerTiling::MakePrioritizedTile( 830 PrioritizedTile PictureLayerTiling::MakePrioritizedTile(
823 Tile* tile, 831 Tile* tile,
824 PriorityRectType priority_rect_type) const { 832 PriorityRectType priority_rect_type) const {
825 DCHECK(tile); 833 DCHECK(tile);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 break; 1088 break;
1081 } 1089 }
1082 1090
1083 gfx::Rect result(origin_x, origin_y, width, height); 1091 gfx::Rect result(origin_x, origin_y, width, height);
1084 if (cache) 1092 if (cache)
1085 cache->previous_result = result; 1093 cache->previous_result = result;
1086 return result; 1094 return result;
1087 } 1095 }
1088 1096
1089 } // namespace cc 1097 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/picture_layer_tiling.h ('k') | cc/tiles/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698