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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1659053002: Remove custom counts histogram from the blink API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a few thread_safe_static_local -> static_local as per feedback in reviews Created 4 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 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 #include "core/timing/Performance.h" 92 #include "core/timing/Performance.h"
93 #include "modules/accessibility/AXObject.h" 93 #include "modules/accessibility/AXObject.h"
94 #include "modules/accessibility/AXObjectCacheImpl.h" 94 #include "modules/accessibility/AXObjectCacheImpl.h"
95 #include "modules/credentialmanager/CredentialManagerClient.h" 95 #include "modules/credentialmanager/CredentialManagerClient.h"
96 #include "modules/encryptedmedia/MediaKeysController.h" 96 #include "modules/encryptedmedia/MediaKeysController.h"
97 #include "modules/storage/StorageNamespaceController.h" 97 #include "modules/storage/StorageNamespaceController.h"
98 #include "modules/webgl/WebGLRenderingContext.h" 98 #include "modules/webgl/WebGLRenderingContext.h"
99 #include "platform/ContextMenu.h" 99 #include "platform/ContextMenu.h"
100 #include "platform/ContextMenuItem.h" 100 #include "platform/ContextMenuItem.h"
101 #include "platform/Cursor.h" 101 #include "platform/Cursor.h"
102 #include "platform/Histogram.h"
102 #include "platform/KeyboardCodes.h" 103 #include "platform/KeyboardCodes.h"
103 #include "platform/Logging.h" 104 #include "platform/Logging.h"
104 #include "platform/NotImplemented.h" 105 #include "platform/NotImplemented.h"
105 #include "platform/PlatformGestureEvent.h" 106 #include "platform/PlatformGestureEvent.h"
106 #include "platform/PlatformKeyboardEvent.h" 107 #include "platform/PlatformKeyboardEvent.h"
107 #include "platform/PlatformMouseEvent.h" 108 #include "platform/PlatformMouseEvent.h"
108 #include "platform/RuntimeEnabledFeatures.h" 109 #include "platform/RuntimeEnabledFeatures.h"
109 #include "platform/TraceEvent.h" 110 #include "platform/TraceEvent.h"
110 #include "platform/UserGestureIndicator.h" 111 #include "platform/UserGestureIndicator.h"
111 #include "platform/exported/WebActiveGestureAnimation.h" 112 #include "platform/exported/WebActiveGestureAnimation.h"
(...skipping 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1985 void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect) 1986 void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect)
1986 { 1987 {
1987 // This should only be used when compositing is not being used for this 1988 // This should only be used when compositing is not being used for this
1988 // WebView, and it is painting into the recording of its parent. 1989 // WebView, and it is painting into the recording of its parent.
1989 ASSERT(!isAcceleratedCompositingActive()); 1990 ASSERT(!isAcceleratedCompositingActive());
1990 1991
1991 double paintStart = currentTime(); 1992 double paintStart = currentTime();
1992 PageWidgetDelegate::paint(*m_page, canvas, rect, *m_page->deprecatedLocalMai nFrame()); 1993 PageWidgetDelegate::paint(*m_page, canvas, rect, *m_page->deprecatedLocalMai nFrame());
1993 double paintEnd = currentTime(); 1994 double paintEnd = currentTime();
1994 double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart); 1995 double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart);
1995 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDurationM S", (paintEnd - paintStart) * 1000, 0, 120, 30); 1996 DEFINE_STATIC_LOCAL(CustomCountHistogram, softwarePaintDurationHistogram, (" Renderer4.SoftwarePaintDurationMS", 0, 120, 30));
1996 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMegapixPe rSecond", pixelsPerSec / 1000000, 10, 210, 30); 1997 softwarePaintDurationHistogram.count((paintEnd - paintStart) * 1000);
1998 DEFINE_STATIC_LOCAL(CustomCountHistogram, softwarePaintRateHistogram, ("Rend erer4.SoftwarePaintMegapixPerSecond", 10, 210, 30));
1999 softwarePaintRateHistogram.count(pixelsPerSec / 1000000);
1997 } 2000 }
1998 2001
1999 #if OS(ANDROID) 2002 #if OS(ANDROID)
2000 void WebViewImpl::paintCompositedDeprecated(WebCanvas* canvas, const WebRect& re ct) 2003 void WebViewImpl::paintCompositedDeprecated(WebCanvas* canvas, const WebRect& re ct)
2001 { 2004 {
2002 // Note: This method exists on OS(ANDROID) and will hopefully be 2005 // Note: This method exists on OS(ANDROID) and will hopefully be
2003 // removed once the link disambiguation feature renders using 2006 // removed once the link disambiguation feature renders using
2004 // the compositor. 2007 // the compositor.
2005 ASSERT(isAcceleratedCompositingActive()); 2008 ASSERT(isAcceleratedCompositingActive());
2006 2009
(...skipping 2548 matching lines...) Expand 10 before | Expand all | Expand 10 after
4555 { 4558 {
4556 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4559 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4557 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4560 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4558 if (!page()) 4561 if (!page())
4559 return 1; 4562 return 1;
4560 4563
4561 return page()->deviceScaleFactor(); 4564 return page()->deviceScaleFactor();
4562 } 4565 }
4563 4566
4564 } // namespace blink 4567 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp ('k') | third_party/WebKit/public/platform/Platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698