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

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

Issue 640873002: cc: Move RequiresHighResToDraw from tree to lthi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/layers/picture_layer_impl_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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 10
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 // tilings during the last draw call on the active layer. 874 // tilings during the last draw call on the active layer.
875 if (tilings_->num_tilings() <= 2 && 875 if (tilings_->num_tilings() <= 2 &&
876 twin_layer_->tilings_->num_tilings() <= tilings_->num_tilings()) { 876 twin_layer_->tilings_->num_tilings() <= tilings_->num_tilings()) {
877 twin_low_res = low_res ? GetTwinTiling(low_res) : NULL; 877 twin_low_res = low_res ? GetTwinTiling(low_res) : NULL;
878 twin_high_res = high_res ? GetTwinTiling(high_res) : NULL; 878 twin_high_res = high_res ? GetTwinTiling(high_res) : NULL;
879 } 879 }
880 880
881 // If this layer and its twin have different transforms, then don't compare 881 // If this layer and its twin have different transforms, then don't compare
882 // them and only allow activating to high res tiles, since tiles on each 882 // them and only allow activating to high res tiles, since tiles on each
883 // layer will be in different places on screen. 883 // layer will be in different places on screen.
884 if (twin_layer_->layer_tree_impl()->RequiresHighResToDraw() || 884 if (layer_tree_impl()->RequiresHighResToDraw() ||
885 bounds() != twin_layer_->bounds() || 885 bounds() != twin_layer_->bounds() ||
886 draw_properties().screen_space_transform != 886 draw_properties().screen_space_transform !=
887 twin_layer_->draw_properties().screen_space_transform) { 887 twin_layer_->draw_properties().screen_space_transform) {
888 twin_high_res = NULL; 888 twin_high_res = NULL;
889 twin_low_res = NULL; 889 twin_low_res = NULL;
890 } 890 }
891 } 891 }
892 892
893 // As a second pass, mark as required any visible high res tiles not filled in 893 // As a second pass, mark as required any visible high res tiles not filled in
894 // by acceptable non-ideal tiles from the first pass. 894 // by acceptable non-ideal tiles from the first pass.
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); 1783 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange();
1784 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; 1784 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start;
1785 return tiling_range.end - 1 - current_tiling_range_offset; 1785 return tiling_range.end - 1 - current_tiling_range_offset;
1786 } 1786 }
1787 } 1787 }
1788 NOTREACHED(); 1788 NOTREACHED();
1789 return 0; 1789 return 0;
1790 } 1790 }
1791 1791
1792 } // namespace cc 1792 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698