OLD | NEW |
---|---|
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_set.h" | 5 #include "cc/resources/picture_layer_tiling_set.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 const PictureLayerTilingSet* twin_set, | 58 const PictureLayerTilingSet* twin_set, |
59 const Region& layer_invalidation, | 59 const Region& layer_invalidation, |
60 float minimum_contents_scale, | 60 float minimum_contents_scale, |
61 float maximum_contents_scale) { | 61 float maximum_contents_scale) { |
62 RemoveTilingsBelowScale(minimum_contents_scale); | 62 RemoveTilingsBelowScale(minimum_contents_scale); |
63 RemoveTilingsAboveScale(maximum_contents_scale); | 63 RemoveTilingsAboveScale(maximum_contents_scale); |
64 | 64 |
65 // Copy over tilings that are shared with the |twin_set| tiling set (if it | 65 // Copy over tilings that are shared with the |twin_set| tiling set (if it |
66 // exists). | 66 // exists). |
67 if (twin_set) { | 67 if (twin_set) { |
68 if (twin_set->tilings_.empty()) { | |
69 // If the twin (pending) tiling set is empty, for example it does not have | |
enne (OOO)
2015/02/14 00:31:05
Are there any reasons why the active tree could st
danakj
2015/02/14 00:41:25
We don't know what properties to use for the tilin
enne (OOO)
2015/02/14 00:50:30
I guess I'm trying to say that I don't understand
danakj
2015/02/14 00:52:20
The pending set is empty means UpdateTiles didn't
enne (OOO)
2015/02/14 00:53:14
Sure, but why does UpdateTiles not happening on th
danakj
2015/02/14 00:57:38
Ah. Well, the other choice is to leave behind a bu
| |
70 // valid draw properties so no tilings, then we drop all tilings here as | |
71 // well, instead of leaving behind unshared tilings that are all | |
72 // non-ideal. | |
73 RemoveAllTilings(); | |
74 } | |
75 | |
68 for (PictureLayerTiling* twin_tiling : twin_set->tilings_) { | 76 for (PictureLayerTiling* twin_tiling : twin_set->tilings_) { |
69 float contents_scale = twin_tiling->contents_scale(); | 77 float contents_scale = twin_tiling->contents_scale(); |
70 DCHECK_GE(contents_scale, minimum_contents_scale); | 78 DCHECK_GE(contents_scale, minimum_contents_scale); |
71 DCHECK_LE(contents_scale, maximum_contents_scale); | 79 DCHECK_LE(contents_scale, maximum_contents_scale); |
72 | 80 |
73 PictureLayerTiling* this_tiling = FindTilingWithScale(contents_scale); | 81 PictureLayerTiling* this_tiling = FindTilingWithScale(contents_scale); |
74 if (!this_tiling) { | 82 if (!this_tiling) { |
75 scoped_ptr<PictureLayerTiling> new_tiling = PictureLayerTiling::Create( | 83 scoped_ptr<PictureLayerTiling> new_tiling = PictureLayerTiling::Create( |
76 contents_scale, raster_source, client_, | 84 contents_scale, raster_source, client_, |
77 max_tiles_for_interest_area_, skewport_target_time_in_seconds_, | 85 max_tiles_for_interest_area_, skewport_target_time_in_seconds_, |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
536 case LOWER_THAN_LOW_RES: | 544 case LOWER_THAN_LOW_RES: |
537 range = TilingRange(low_res_range.end, tilings_.size()); | 545 range = TilingRange(low_res_range.end, tilings_.size()); |
538 break; | 546 break; |
539 } | 547 } |
540 | 548 |
541 DCHECK_LE(range.start, range.end); | 549 DCHECK_LE(range.start, range.end); |
542 return range; | 550 return range; |
543 } | 551 } |
544 | 552 |
545 } // namespace cc | 553 } // namespace cc |
OLD | NEW |