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

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

Issue 2404423002: cc: Make pending visible rect active tree tiles be in the NOW bin. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | cc/tiles/raster_tile_priority_queue_all.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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 PriorityRectType priority_rect_type) const { 801 PriorityRectType priority_rect_type) const {
802 // TODO(vmpstr): See if this can be moved to iterators. 802 // TODO(vmpstr): See if this can be moved to iterators.
803 DCHECK_EQ(ComputePriorityRectTypeForTile(tile), priority_rect_type); 803 DCHECK_EQ(ComputePriorityRectTypeForTile(tile), priority_rect_type);
804 DCHECK_EQ(TileAt(tile->tiling_i_index(), tile->tiling_j_index()), tile); 804 DCHECK_EQ(TileAt(tile->tiling_i_index(), tile->tiling_j_index()), tile);
805 805
806 TilePriority::PriorityBin priority_bin = client_->HasValidTilePriorities() 806 TilePriority::PriorityBin priority_bin = client_->HasValidTilePriorities()
807 ? TilePriority::NOW 807 ? TilePriority::NOW
808 : TilePriority::EVENTUALLY; 808 : TilePriority::EVENTUALLY;
809 switch (priority_rect_type) { 809 switch (priority_rect_type) {
810 case VISIBLE_RECT: 810 case VISIBLE_RECT:
811 return TilePriority(resolution_, priority_bin, 0);
812 case PENDING_VISIBLE_RECT: 811 case PENDING_VISIBLE_RECT:
813 if (priority_bin < TilePriority::SOON)
814 priority_bin = TilePriority::SOON;
815 return TilePriority(resolution_, priority_bin, 0); 812 return TilePriority(resolution_, priority_bin, 0);
816 case SKEWPORT_RECT: 813 case SKEWPORT_RECT:
817 case SOON_BORDER_RECT: 814 case SOON_BORDER_RECT:
818 if (priority_bin < TilePriority::SOON) 815 if (priority_bin < TilePriority::SOON)
819 priority_bin = TilePriority::SOON; 816 priority_bin = TilePriority::SOON;
820 break; 817 break;
821 case EVENTUALLY_RECT: 818 case EVENTUALLY_RECT:
822 priority_bin = TilePriority::EVENTUALLY; 819 priority_bin = TilePriority::EVENTUALLY;
823 break; 820 break;
824 } 821 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 size_t PictureLayerTiling::GPUMemoryUsageInBytes() const { 876 size_t PictureLayerTiling::GPUMemoryUsageInBytes() const {
880 size_t amount = 0; 877 size_t amount = 0;
881 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) { 878 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) {
882 const Tile* tile = it->second.get(); 879 const Tile* tile = it->second.get();
883 amount += tile->GPUMemoryUsageInBytes(); 880 amount += tile->GPUMemoryUsageInBytes();
884 } 881 }
885 return amount; 882 return amount;
886 } 883 }
887 884
888 } // namespace cc 885 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/tiles/raster_tile_priority_queue_all.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698