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

Side by Side Diff: cc/trees/layer_tree_host.cc

Issue 265883013: cc: Add a flag to layers that returns true if the layer is in RSLL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 10
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 root_layer, 776 root_layer,
777 device_viewport_size(), 777 device_viewport_size(),
778 gfx::Transform(), 778 gfx::Transform(),
779 device_scale_factor_, 779 device_scale_factor_,
780 page_scale_factor_, 780 page_scale_factor_,
781 page_scale_layer, 781 page_scale_layer,
782 GetRendererCapabilities().max_texture_size, 782 GetRendererCapabilities().max_texture_size,
783 settings_.can_use_lcd_text, 783 settings_.can_use_lcd_text,
784 can_render_to_separate_surface, 784 can_render_to_separate_surface,
785 settings_.layer_transforms_should_scale_layer_contents, 785 settings_.layer_transforms_should_scale_layer_contents,
786 &update_list); 786 &update_list,
787 0);
787 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 788 LayerTreeHostCommon::CalculateDrawProperties(&inputs);
788 789
789 if (total_frames_used_for_lcd_text_metrics_ <= 790 if (total_frames_used_for_lcd_text_metrics_ <=
790 kTotalFramesToUseForLCDTextMetrics) { 791 kTotalFramesToUseForLCDTextMetrics) {
791 LayerTreeHostCommon::CallFunctionForSubtree( 792 LayerTreeHostCommon::CallFunctionForSubtree(
792 root_layer, 793 root_layer,
793 base::Bind(&LayerTreeHost::CalculateLCDTextMetricsCallback, 794 base::Bind(&LayerTreeHost::CalculateLCDTextMetricsCallback,
794 base::Unretained(this))); 795 base::Unretained(this)));
795 total_frames_used_for_lcd_text_metrics_++; 796 total_frames_used_for_lcd_text_metrics_++;
796 } 797 }
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 swap_promise_list_.push_back(swap_promise.Pass()); 1233 swap_promise_list_.push_back(swap_promise.Pass());
1233 } 1234 }
1234 1235
1235 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { 1236 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
1236 for (size_t i = 0; i < swap_promise_list_.size(); i++) 1237 for (size_t i = 0; i < swap_promise_list_.size(); i++)
1237 swap_promise_list_[i]->DidNotSwap(reason); 1238 swap_promise_list_[i]->DidNotSwap(reason);
1238 swap_promise_list_.clear(); 1239 swap_promise_list_.clear();
1239 } 1240 }
1240 1241
1241 } // namespace cc 1242 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698