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/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 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 // them and only allow activating to high res tiles, since tiles on each layer | 756 // them and only allow activating to high res tiles, since tiles on each layer |
757 // will be in different places on screen. | 757 // will be in different places on screen. |
758 if (!twin_high_res || !twin_low_res || | 758 if (!twin_high_res || !twin_low_res || |
759 twin_layer_->layer_tree_impl()->RequiresHighResToDraw() || | 759 twin_layer_->layer_tree_impl()->RequiresHighResToDraw() || |
760 draw_properties().screen_space_transform != | 760 draw_properties().screen_space_transform != |
761 twin_layer_->draw_properties().screen_space_transform) { | 761 twin_layer_->draw_properties().screen_space_transform) { |
762 twin_high_res = NULL; | 762 twin_high_res = NULL; |
763 twin_low_res = NULL; | 763 twin_low_res = NULL; |
764 } | 764 } |
765 | 765 |
| 766 // TODO(enne): temporarily disable this optimization: http://crbug.com/335289 |
| 767 twin_high_res = NULL; |
| 768 twin_low_res = NULL; |
| 769 |
766 // As a second pass, mark as required any visible high res tiles not filled in | 770 // As a second pass, mark as required any visible high res tiles not filled in |
767 // by acceptable non-ideal tiles from the first pass. | 771 // by acceptable non-ideal tiles from the first pass. |
768 if (MarkVisibleTilesAsRequired( | 772 if (MarkVisibleTilesAsRequired( |
769 high_res, twin_high_res, contents_scale_x(), rect, missing_region)) { | 773 high_res, twin_high_res, contents_scale_x(), rect, missing_region)) { |
770 // As an optional third pass, if a high res tile was skipped because its | 774 // As an optional third pass, if a high res tile was skipped because its |
771 // twin was also missing, then fall back to mark low res tiles as required | 775 // twin was also missing, then fall back to mark low res tiles as required |
772 // in case the active twin is substituting those for missing high res | 776 // in case the active twin is substituting those for missing high res |
773 // content. | 777 // content. |
774 MarkVisibleTilesAsRequired( | 778 MarkVisibleTilesAsRequired( |
775 low_res, twin_low_res, contents_scale_x(), rect, missing_region); | 779 low_res, twin_low_res, contents_scale_x(), rect, missing_region); |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1232 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { | 1236 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { |
1233 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); | 1237 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); |
1234 return tilings_->GPUMemoryUsageInBytes(); | 1238 return tilings_->GPUMemoryUsageInBytes(); |
1235 } | 1239 } |
1236 | 1240 |
1237 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { | 1241 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { |
1238 benchmark->RunOnLayer(this); | 1242 benchmark->RunOnLayer(this); |
1239 } | 1243 } |
1240 | 1244 |
1241 } // namespace cc | 1245 } // namespace cc |
OLD | NEW |