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

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

Issue 733233003: Revert of cc: Toggle LCD text at raster time instead of record time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « cc/test/solid_color_content_layer_client.h ('k') | cc/trees/layer_tree_host_common.h » ('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 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, device_viewport_size(), gfx::Transform(), 848 root_layer,
849 device_scale_factor_, page_scale_factor_, page_scale_layer, 849 device_viewport_size(),
850 GetRendererCapabilities().max_texture_size, settings_.can_use_lcd_text, 850 gfx::Transform(),
851 settings_.layers_always_allowed_lcd_text, 851 device_scale_factor_,
852 page_scale_factor_,
853 page_scale_layer,
854 GetRendererCapabilities().max_texture_size,
855 settings_.can_use_lcd_text,
852 can_render_to_separate_surface, 856 can_render_to_separate_surface,
853 settings_.layer_transforms_should_scale_layer_contents, &update_list, 857 settings_.layer_transforms_should_scale_layer_contents,
858 &update_list,
854 render_surface_layer_list_id); 859 render_surface_layer_list_id);
855 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 860 LayerTreeHostCommon::CalculateDrawProperties(&inputs);
856 861
857 if (total_frames_used_for_lcd_text_metrics_ <= 862 if (total_frames_used_for_lcd_text_metrics_ <=
858 kTotalFramesToUseForLCDTextMetrics) { 863 kTotalFramesToUseForLCDTextMetrics) {
859 LayerTreeHostCommon::CallFunctionForSubtree( 864 LayerTreeHostCommon::CallFunctionForSubtree(
860 root_layer, 865 root_layer,
861 base::Bind(&LayerTreeHost::CalculateLCDTextMetricsCallback, 866 base::Bind(&LayerTreeHost::CalculateLCDTextMetricsCallback,
862 base::Unretained(this))); 867 base::Unretained(this)));
863 total_frames_used_for_lcd_text_metrics_++; 868 total_frames_used_for_lcd_text_metrics_++;
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 1351
1347 void LayerTreeHost::set_surface_id_namespace(uint32_t id_namespace) { 1352 void LayerTreeHost::set_surface_id_namespace(uint32_t id_namespace) {
1348 surface_id_namespace_ = id_namespace; 1353 surface_id_namespace_ = id_namespace;
1349 } 1354 }
1350 1355
1351 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() { 1356 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() {
1352 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++); 1357 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++);
1353 } 1358 }
1354 1359
1355 } // namespace cc 1360 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/solid_color_content_layer_client.h ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698