OLD | NEW |
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 Loading... |
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 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2048 void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect) | 2049 void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect) |
2049 { | 2050 { |
2050 // This should only be used when compositing is not being used for this | 2051 // This should only be used when compositing is not being used for this |
2051 // WebView, and it is painting into the recording of its parent. | 2052 // WebView, and it is painting into the recording of its parent. |
2052 ASSERT(!isAcceleratedCompositingActive()); | 2053 ASSERT(!isAcceleratedCompositingActive()); |
2053 | 2054 |
2054 double paintStart = currentTime(); | 2055 double paintStart = currentTime(); |
2055 PageWidgetDelegate::paint(*m_page, canvas, rect, *m_page->deprecatedLocalMai
nFrame()); | 2056 PageWidgetDelegate::paint(*m_page, canvas, rect, *m_page->deprecatedLocalMai
nFrame()); |
2056 double paintEnd = currentTime(); | 2057 double paintEnd = currentTime(); |
2057 double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart); | 2058 double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart); |
2058 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDurationM
S", (paintEnd - paintStart) * 1000, 0, 120, 30); | 2059 DEFINE_STATIC_LOCAL(CustomCountHistogram, softwarePaintDurationHistogram, ("
Renderer4.SoftwarePaintDurationMS", 0, 120, 30)); |
2059 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMegapixPe
rSecond", pixelsPerSec / 1000000, 10, 210, 30); | 2060 softwarePaintDurationHistogram.count((paintEnd - paintStart) * 1000); |
| 2061 DEFINE_STATIC_LOCAL(CustomCountHistogram, softwarePaintRateHistogram, ("Rend
erer4.SoftwarePaintMegapixPerSecond", 10, 210, 30)); |
| 2062 softwarePaintRateHistogram.count(pixelsPerSec / 1000000); |
2060 } | 2063 } |
2061 | 2064 |
2062 #if OS(ANDROID) | 2065 #if OS(ANDROID) |
2063 void WebViewImpl::paintCompositedDeprecated(WebCanvas* canvas, const WebRect& re
ct) | 2066 void WebViewImpl::paintCompositedDeprecated(WebCanvas* canvas, const WebRect& re
ct) |
2064 { | 2067 { |
2065 // Note: This method exists on OS(ANDROID) and will hopefully be | 2068 // Note: This method exists on OS(ANDROID) and will hopefully be |
2066 // removed once the link disambiguation feature renders using | 2069 // removed once the link disambiguation feature renders using |
2067 // the compositor. | 2070 // the compositor. |
2068 ASSERT(isAcceleratedCompositingActive()); | 2071 ASSERT(isAcceleratedCompositingActive()); |
2069 | 2072 |
(...skipping 2560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4630 { | 4633 { |
4631 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4634 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
4632 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4635 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
4633 if (!page()) | 4636 if (!page()) |
4634 return 1; | 4637 return 1; |
4635 | 4638 |
4636 return page()->deviceScaleFactor(); | 4639 return page()->deviceScaleFactor(); |
4637 } | 4640 } |
4638 | 4641 |
4639 } // namespace blink | 4642 } // namespace blink |
OLD | NEW |