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

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

Issue 161023002: Revert of cc: Disable "activate to low res" optimization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« 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 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
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
770 // As a second pass, mark as required any visible high res tiles not filled in 766 // As a second pass, mark as required any visible high res tiles not filled in
771 // by acceptable non-ideal tiles from the first pass. 767 // by acceptable non-ideal tiles from the first pass.
772 if (MarkVisibleTilesAsRequired( 768 if (MarkVisibleTilesAsRequired(
773 high_res, twin_high_res, contents_scale_x(), rect, missing_region)) { 769 high_res, twin_high_res, contents_scale_x(), rect, missing_region)) {
774 // As an optional third pass, if a high res tile was skipped because its 770 // As an optional third pass, if a high res tile was skipped because its
775 // twin was also missing, then fall back to mark low res tiles as required 771 // twin was also missing, then fall back to mark low res tiles as required
776 // in case the active twin is substituting those for missing high res 772 // in case the active twin is substituting those for missing high res
777 // content. 773 // content.
778 MarkVisibleTilesAsRequired( 774 MarkVisibleTilesAsRequired(
779 low_res, twin_low_res, contents_scale_x(), rect, missing_region); 775 low_res, twin_low_res, contents_scale_x(), rect, missing_region);
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { 1232 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const {
1237 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); 1233 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded();
1238 return tilings_->GPUMemoryUsageInBytes(); 1234 return tilings_->GPUMemoryUsageInBytes();
1239 } 1235 }
1240 1236
1241 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { 1237 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
1242 benchmark->RunOnLayer(this); 1238 benchmark->RunOnLayer(this);
1243 } 1239 }
1244 1240
1245 } // namespace cc 1241 } // 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