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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 913203006: cc: Calculate "can use lcd text" on the compositor thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove tuple to fix Android compile Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 56bca4f8028dd8b8cb4d045e66f3a20a848102e8..426927aaaba8b18b75a68fdc0c77979e39d026fd 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -133,7 +133,6 @@ LayerTreeHost::LayerTreeHost(
partial_texture_update_requests_(0),
did_complete_scale_animation_(false),
in_paint_layer_contents_(false),
- total_frames_used_for_lcd_text_metrics_(0),
id_(s_layer_tree_host_sequence_number.GetNext() + 1),
next_commit_forces_redraw_(false),
shared_bitmap_manager_(shared_bitmap_manager),
@@ -813,18 +812,6 @@ void LayerTreeHost::RecordGpuRasterizationHistogram() {
gpu_rasterization_histogram_recorded_ = true;
}
-void LayerTreeHost::CalculateLCDTextMetricsCallback(Layer* layer) {
- if (!layer->SupportsLCDText())
- return;
-
- lcd_text_metrics_.total_num_cc_layers++;
- if (layer->draw_properties().can_use_lcd_text) {
- lcd_text_metrics_.total_num_cc_layers_can_use_lcd_text++;
- if (layer->contents_opaque())
- lcd_text_metrics_.total_num_cc_layers_will_use_lcd_text++;
- }
-}
-
bool LayerTreeHost::UsingSharedMemoryResources() {
return GetRendererCapabilities().using_shared_memory_resources;
}
@@ -865,29 +852,6 @@ bool LayerTreeHost::UpdateLayers(Layer* root_layer,
settings_.verify_property_trees, &update_list,
render_surface_layer_list_id);
LayerTreeHostCommon::CalculateDrawProperties(&inputs);
-
- if (total_frames_used_for_lcd_text_metrics_ <=
- kTotalFramesToUseForLCDTextMetrics) {
- LayerTreeHostCommon::CallFunctionForSubtree(
- root_layer,
- base::Bind(&LayerTreeHost::CalculateLCDTextMetricsCallback,
- base::Unretained(this)));
- total_frames_used_for_lcd_text_metrics_++;
- }
-
- if (total_frames_used_for_lcd_text_metrics_ ==
- kTotalFramesToUseForLCDTextMetrics) {
- total_frames_used_for_lcd_text_metrics_++;
-
- UMA_HISTOGRAM_PERCENTAGE(
- "Renderer4.LCDText.PercentageOfCandidateLayers",
- lcd_text_metrics_.total_num_cc_layers_can_use_lcd_text * 100.0 /
- lcd_text_metrics_.total_num_cc_layers);
- UMA_HISTOGRAM_PERCENTAGE(
- "Renderer4.LCDText.PercentageOfAALayers",
- lcd_text_metrics_.total_num_cc_layers_will_use_lcd_text * 100.0 /
- lcd_text_metrics_.total_num_cc_layers_can_use_lcd_text);
- }
}
// Reset partial texture update requests.
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698