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

Side by Side Diff: cc/layers/content_layer.cc

Issue 13265003: cc: Switch ContentLayerUpdater to use RenderingStatsInstrumentation (Closed) Base URL: http://git.chromium.org/chromium/src.git@update
Patch Set: Added printfs Created 7 years, 8 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
« no previous file with comments | « cc/debug/rendering_stats_instrumentation.cc ('k') | cc/layers/scrollbar_layer.cc » ('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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/layers/content_layer.h" 5 #include "cc/layers/content_layer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "cc/layers/content_layer_client.h" 10 #include "cc/layers/content_layer_client.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 return NeedsIdlePaint(); 86 return NeedsIdlePaint();
87 } 87 }
88 88
89 LayerUpdater* ContentLayer::Updater() const { 89 LayerUpdater* ContentLayer::Updater() const {
90 return updater_.get(); 90 return updater_.get();
91 } 91 }
92 92
93 void ContentLayer::CreateUpdaterIfNeeded() { 93 void ContentLayer::CreateUpdaterIfNeeded() {
94 if (updater_) 94 if (updater_)
95 return; 95 return;
96
97 printf("ContentLayer::CreateUpdaterIfNeeded\n");
98
96 scoped_ptr<LayerPainter> painter = 99 scoped_ptr<LayerPainter> painter =
97 ContentLayerPainter::Create(client_).PassAs<LayerPainter>(); 100 ContentLayerPainter::Create(client_).PassAs<LayerPainter>();
98 if (layer_tree_host()->settings().accelerate_painting) 101 if (layer_tree_host()->settings().accelerate_painting)
99 updater_ = SkPictureContentLayerUpdater::Create( 102 updater_ = SkPictureContentLayerUpdater::Create(
100 painter.Pass(), 103 painter.Pass(),
101 rendering_stats_instrumentation()); 104 rendering_stats_instrumentation());
102 else if (layer_tree_host()->settings().per_tile_painting_enabled) 105 else if (layer_tree_host()->settings().per_tile_painting_enabled)
103 updater_ = BitmapSkPictureContentLayerUpdater::Create( 106 updater_ = BitmapSkPictureContentLayerUpdater::Create(
104 painter.Pass(), 107 painter.Pass(),
105 rendering_stats_instrumentation()); 108 rendering_stats_instrumentation());
(...skipping 17 matching lines...) Expand all
123 void ContentLayer::UpdateCanUseLCDText() { 126 void ContentLayer::UpdateCanUseLCDText() {
124 if (can_use_lcd_text_last_frame_ == can_use_lcd_text()) 127 if (can_use_lcd_text_last_frame_ == can_use_lcd_text())
125 return; 128 return;
126 129
127 can_use_lcd_text_last_frame_ = can_use_lcd_text(); 130 can_use_lcd_text_last_frame_ = can_use_lcd_text();
128 if (client_) 131 if (client_)
129 client_->DidChangeLayerCanUseLCDText(); 132 client_->DidChangeLayerCanUseLCDText();
130 } 133 }
131 134
132 } // namespace cc 135 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/rendering_stats_instrumentation.cc ('k') | cc/layers/scrollbar_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698