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

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

Issue 2678903003: cc: Clean up naming of paint-related identifiers (Closed)
Patch Set: Created 3 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
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_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 viewport_damage_rect_.Union(damage_rect); 1054 viewport_damage_rect_.Union(damage_rect);
1055 } 1055 }
1056 1056
1057 DrawResult LayerTreeHostImpl::PrepareToDraw(FrameData* frame) { 1057 DrawResult LayerTreeHostImpl::PrepareToDraw(FrameData* frame) {
1058 TRACE_EVENT1("cc", "LayerTreeHostImpl::PrepareToDraw", "SourceFrameNumber", 1058 TRACE_EVENT1("cc", "LayerTreeHostImpl::PrepareToDraw", "SourceFrameNumber",
1059 active_tree_->source_frame_number()); 1059 active_tree_->source_frame_number());
1060 if (input_handler_client_) 1060 if (input_handler_client_)
1061 input_handler_client_->ReconcileElasticOverscrollAndRootScroll(); 1061 input_handler_client_->ReconcileElasticOverscrollAndRootScroll();
1062 1062
1063 if (const char* client_name = GetClientNameForMetrics()) { 1063 if (const char* client_name = GetClientNameForMetrics()) {
1064 size_t total_picture_memory = 0; 1064 size_t total_memory = 0;
1065 for (const PictureLayerImpl* layer : active_tree()->picture_layers()) 1065 for (const PictureLayerImpl* layer : active_tree()->picture_layers())
1066 total_picture_memory += layer->GetRasterSource()->GetPictureMemoryUsage(); 1066 total_memory += layer->GetRasterSource()->GetMemoryUsage();
1067 if (total_picture_memory != 0) { 1067 if (total_memory != 0) {
1068 // GetClientNameForMetrics only returns one non-null value over the 1068 // GetClientNameForMetrics only returns one non-null value over the
1069 // lifetime of the process, so this histogram name is runtime constant. 1069 // lifetime of the process, so this histogram name is runtime constant.
1070 UMA_HISTOGRAM_COUNTS( 1070 UMA_HISTOGRAM_COUNTS(
1071 base::StringPrintf("Compositing.%s.PictureMemoryUsageKb", 1071 base::StringPrintf("Compositing.%s.PictureMemoryUsageKb",
1072 client_name), 1072 client_name),
1073 base::saturated_cast<int>(total_picture_memory / 1024)); 1073 base::saturated_cast<int>(total_memory / 1024));
1074 } 1074 }
1075 // GetClientNameForMetrics only returns one non-null value over the lifetime 1075 // GetClientNameForMetrics only returns one non-null value over the lifetime
1076 // of the process, so this histogram name is runtime constant. 1076 // of the process, so this histogram name is runtime constant.
1077 UMA_HISTOGRAM_CUSTOM_COUNTS( 1077 UMA_HISTOGRAM_CUSTOM_COUNTS(
1078 base::StringPrintf("Compositing.%s.NumActiveLayers", client_name), 1078 base::StringPrintf("Compositing.%s.NumActiveLayers", client_name),
1079 base::saturated_cast<int>(active_tree_->NumLayers()), 1, 400, 20); 1079 base::saturated_cast<int>(active_tree_->NumLayers()), 1, 400, 20);
1080 } 1080 }
1081 1081
1082 bool update_lcd_text = false; 1082 bool update_lcd_text = false;
1083 bool ok = active_tree_->UpdateDrawProperties(update_lcd_text); 1083 bool ok = active_tree_->UpdateDrawProperties(update_lcd_text);
(...skipping 3001 matching lines...) Expand 10 before | Expand all | Expand 10 after
4085 worker_context_visibility_ = 4085 worker_context_visibility_ =
4086 worker_context->CacheController()->ClientBecameVisible(); 4086 worker_context->CacheController()->ClientBecameVisible();
4087 } else { 4087 } else {
4088 worker_context->CacheController()->ClientBecameNotVisible( 4088 worker_context->CacheController()->ClientBecameNotVisible(
4089 std::move(worker_context_visibility_)); 4089 std::move(worker_context_visibility_));
4090 } 4090 }
4091 } 4091 }
4092 } 4092 }
4093 4093
4094 } // namespace cc 4094 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698