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

Side by Side Diff: Source/core/rendering/RenderLayerCompositor.cpp

Issue 23458035: UMA stats instrumentation for Renderer.AcceleratedFixedRootBackground (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 frameViewDidScroll(); 1186 frameViewDidScroll();
1187 updateOverflowControlsLayers(); 1187 updateOverflowControlsLayers();
1188 1188
1189 #if ENABLE(RUBBER_BANDING) 1189 #if ENABLE(RUBBER_BANDING)
1190 if (m_layerForOverhangAreas) 1190 if (m_layerForOverhangAreas)
1191 m_layerForOverhangAreas->setSize(frameView->frameRect().size()); 1191 m_layerForOverhangAreas->setSize(frameView->frameRect().size());
1192 #endif 1192 #endif
1193 } 1193 }
1194 } 1194 }
1195 1195
1196 enum AcceleratedFixedRootBackgroundHistogramBuckets {
1197 ScrolledMainFrameBucket = 0,
1198 ScrolledMainFrameWithAcceleratedFixedRootBackground = 1,
1199 ScrolledMainFrameWithUnacceleratedFixedRootBackground = 2,
1200 AcceleratedFixedRootBackgroundHistogramMax = 3
1201 };
1202
1196 void RenderLayerCompositor::frameViewDidScroll() 1203 void RenderLayerCompositor::frameViewDidScroll()
1197 { 1204 {
1198 FrameView* frameView = m_renderView->frameView(); 1205 FrameView* frameView = m_renderView->frameView();
1199 IntPoint scrollPosition = frameView->scrollPosition(); 1206 IntPoint scrollPosition = frameView->scrollPosition();
1200 1207
1201 if (!m_scrollLayer) 1208 if (!m_scrollLayer)
1202 return; 1209 return;
1203 1210
1204 bool scrollingCoordinatorHandlesOffset = false; 1211 bool scrollingCoordinatorHandlesOffset = false;
1205 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator( )) { 1212 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator( )) {
1206 if (Settings* settings = m_renderView->document().settings()) { 1213 if (Settings* settings = m_renderView->document().settings()) {
1207 if (isMainFrame() || settings->compositedScrollingForFramesEnabled() ) 1214 if (isMainFrame() || settings->compositedScrollingForFramesEnabled() )
1208 scrollingCoordinatorHandlesOffset = scrollingCoordinator->scroll ableAreaScrollLayerDidChange(frameView); 1215 scrollingCoordinatorHandlesOffset = scrollingCoordinator->scroll ableAreaScrollLayerDidChange(frameView);
1209 } 1216 }
1210 } 1217 }
1211 1218
1212 // Scroll position = scroll minimum + scroll offset. Adjust the layer's 1219 // Scroll position = scroll minimum + scroll offset. Adjust the layer's
1213 // position to handle whatever the scroll coordinator isn't handling. 1220 // position to handle whatever the scroll coordinator isn't handling.
1214 // The minimum scroll position is non-zero for RTL pages with overflow. 1221 // The minimum scroll position is non-zero for RTL pages with overflow.
1215 if (scrollingCoordinatorHandlesOffset) 1222 if (scrollingCoordinatorHandlesOffset)
1216 m_scrollLayer->setPosition(-frameView->minimumScrollPosition()); 1223 m_scrollLayer->setPosition(-frameView->minimumScrollPosition());
1217 else 1224 else
1218 m_scrollLayer->setPosition(-scrollPosition); 1225 m_scrollLayer->setPosition(-scrollPosition);
1226
1227
1228 HistogramSupport::histogramEnumeration("Renderer.AcceleratedFixedRootBackgro und",
1229 ScrolledMainFrameBucket,
1230 AcceleratedFixedRootBackgroundHistogramMax);
1231
1232 if (!m_renderView->rootBackgroundIsEntirelyFixed())
hartmanng 2013/09/09 14:31:26 I remember you mentioned that pages can have parti
1233 return;
1234
1235 HistogramSupport::histogramEnumeration("Renderer.AcceleratedFixedRootBackgro und",
1236 !!fixedRootBackgroundLayer()
1237 ? ScrolledMainFrameWithAcceleratedFixedRootBackground
1238 : ScrolledMainFrameWithUnacceleratedFixedRootBackground,
1239 AcceleratedFixedRootBackgroundHistogramMax);
1219 } 1240 }
1220 1241
1221 void RenderLayerCompositor::frameViewDidLayout() 1242 void RenderLayerCompositor::frameViewDidLayout()
1222 { 1243 {
1223 } 1244 }
1224 1245
1225 void RenderLayerCompositor::rootFixedBackgroundsChanged() 1246 void RenderLayerCompositor::rootFixedBackgroundsChanged()
1226 { 1247 {
1227 if (!supportsFixedRootBackgroundCompositing()) 1248 if (!supportsFixedRootBackgroundCompositing())
1228 return; 1249 return;
(...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after
2734 } else if (graphicsLayer == m_scrollLayer.get()) { 2755 } else if (graphicsLayer == m_scrollLayer.get()) {
2735 name = "Frame Scrolling Layer"; 2756 name = "Frame Scrolling Layer";
2736 } else { 2757 } else {
2737 ASSERT_NOT_REACHED(); 2758 ASSERT_NOT_REACHED();
2738 } 2759 }
2739 2760
2740 return name; 2761 return name;
2741 } 2762 }
2742 2763
2743 } // namespace WebCore 2764 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698