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

Side by Side Diff: cc/content_layer.cc

Issue 12041015: Use proper histogram macros for Renderer4 histograms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/frame_rate_counter.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/content_layer.h" 5 #include "cc/content_layer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 14 matching lines...) Expand all
25 { 25 {
26 return make_scoped_ptr(new ContentLayerPainter(client)); 26 return make_scoped_ptr(new ContentLayerPainter(client));
27 } 27 }
28 28
29 void ContentLayerPainter::paint(SkCanvas* canvas, gfx::Rect contentRect, gfx::Re ctF& opaque) 29 void ContentLayerPainter::paint(SkCanvas* canvas, gfx::Rect contentRect, gfx::Re ctF& opaque)
30 { 30 {
31 base::TimeTicks paintStart = base::TimeTicks::HighResNow(); 31 base::TimeTicks paintStart = base::TimeTicks::HighResNow();
32 m_client->paintContents(canvas, contentRect, opaque); 32 m_client->paintContents(canvas, contentRect, opaque);
33 base::TimeTicks paintEnd = base::TimeTicks::HighResNow(); 33 base::TimeTicks paintEnd = base::TimeTicks::HighResNow();
34 double pixelsPerSec = (contentRect.width() * contentRect.height()) / (paintE nd - paintStart).InSecondsF(); 34 double pixelsPerSec = (contentRect.width() * contentRect.height()) / (paintE nd - paintStart).InSecondsF();
35 HISTOGRAM_CUSTOM_COUNTS("Renderer4.AccelContentPaintDurationMS", (paintEnd - paintStart).InMilliseconds(), 0, 120, 30); 35 UMA_HISTOGRAM_CUSTOM_COUNTS("Renderer4.AccelContentPaintDurationMS",
36 HISTOGRAM_CUSTOM_COUNTS("Renderer4.AccelContentPaintMegapixPerSecond", pixel sPerSec / 1000000, 10, 210, 30); 36 (paintEnd - paintStart).InMilliseconds(),
37 0, 120, 30);
38 UMA_HISTOGRAM_CUSTOM_COUNTS("Renderer4.AccelContentPaintMegapixPerSecond",
39 pixelsPerSec / 1000000, 10, 210, 30);
37 } 40 }
38 41
39 const int ContentLayer::kLCDTextMaxChangeCount = 1; 42 const int ContentLayer::kLCDTextMaxChangeCount = 1;
40 43
41 scoped_refptr<ContentLayer> ContentLayer::create(ContentLayerClient* client) 44 scoped_refptr<ContentLayer> ContentLayer::create(ContentLayerClient* client)
42 { 45 {
43 return make_scoped_refptr(new ContentLayer(client)); 46 return make_scoped_refptr(new ContentLayer(client));
44 } 47 }
45 48
46 ContentLayer::ContentLayer(ContentLayerClient* client) 49 ContentLayer::ContentLayer(ContentLayerClient* client)
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // it does not really cause any invalidation. 146 // it does not really cause any invalidation.
144 TRACE_EVENT_INSTANT0("cc", "ContentLayer::canUseLCDTextDidChange"); 147 TRACE_EVENT_INSTANT0("cc", "ContentLayer::canUseLCDTextDidChange");
145 } 148 }
146 ++m_lcdTextChangeCount; 149 ++m_lcdTextChangeCount;
147 150
148 // Need to repaint the layer with different text AA setting. 151 // Need to repaint the layer with different text AA setting.
149 setNeedsDisplay(); 152 setNeedsDisplay();
150 } 153 }
151 154
152 } // namespace cc 155 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/frame_rate_counter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698