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

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

Issue 684543006: cc: Toggle LCD text at raster time instead of record time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lcdraster: initvar Created 6 years, 1 month 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
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 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 device_viewport_size(), device_scale_factor_); 838 device_viewport_size(), device_scale_factor_);
839 } 839 }
840 840
841 TRACE_EVENT0("cc", "LayerTreeHost::UpdateLayers::CalcDrawProps"); 841 TRACE_EVENT0("cc", "LayerTreeHost::UpdateLayers::CalcDrawProps");
842 bool can_render_to_separate_surface = true; 842 bool can_render_to_separate_surface = true;
843 // TODO(vmpstr): Passing 0 as the current render surface layer list id means 843 // TODO(vmpstr): Passing 0 as the current render surface layer list id means
844 // that we won't be able to detect if a layer is part of |update_list|. 844 // that we won't be able to detect if a layer is part of |update_list|.
845 // Change this if this information is required. 845 // Change this if this information is required.
846 int render_surface_layer_list_id = 0; 846 int render_surface_layer_list_id = 0;
847 LayerTreeHostCommon::CalcDrawPropsMainInputs inputs( 847 LayerTreeHostCommon::CalcDrawPropsMainInputs inputs(
848 root_layer, 848 root_layer, device_viewport_size(), gfx::Transform(),
849 device_viewport_size(), 849 device_scale_factor_, page_scale_factor_, page_scale_layer,
850 gfx::Transform(), 850 GetRendererCapabilities().max_texture_size, settings_.can_use_lcd_text,
851 device_scale_factor_, 851 settings_.layers_always_allowed_lcd_text,
852 page_scale_factor_,
853 page_scale_layer,
854 GetRendererCapabilities().max_texture_size,
855 settings_.can_use_lcd_text,
856 can_render_to_separate_surface, 852 can_render_to_separate_surface,
857 settings_.layer_transforms_should_scale_layer_contents, 853 settings_.layer_transforms_should_scale_layer_contents, &update_list,
858 &update_list,
859 render_surface_layer_list_id); 854 render_surface_layer_list_id);
860 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 855 LayerTreeHostCommon::CalculateDrawProperties(&inputs);
861 856
862 if (total_frames_used_for_lcd_text_metrics_ <= 857 if (total_frames_used_for_lcd_text_metrics_ <=
863 kTotalFramesToUseForLCDTextMetrics) { 858 kTotalFramesToUseForLCDTextMetrics) {
864 LayerTreeHostCommon::CallFunctionForSubtree( 859 LayerTreeHostCommon::CallFunctionForSubtree(
865 root_layer, 860 root_layer,
866 base::Bind(&LayerTreeHost::CalculateLCDTextMetricsCallback, 861 base::Bind(&LayerTreeHost::CalculateLCDTextMetricsCallback,
867 base::Unretained(this))); 862 base::Unretained(this)));
868 total_frames_used_for_lcd_text_metrics_++; 863 total_frames_used_for_lcd_text_metrics_++;
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1351 1346
1352 void LayerTreeHost::set_surface_id_namespace(uint32_t id_namespace) { 1347 void LayerTreeHost::set_surface_id_namespace(uint32_t id_namespace) {
1353 surface_id_namespace_ = id_namespace; 1348 surface_id_namespace_ = id_namespace;
1354 } 1349 }
1355 1350
1356 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() { 1351 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() {
1357 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++); 1352 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++);
1358 } 1353 }
1359 1354
1360 } // namespace cc 1355 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698