| OLD | NEW |
| 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 28 matching lines...) Expand all Loading... |
| 39 #include "core/inspector/InspectorInstrumentation.h" | 39 #include "core/inspector/InspectorInstrumentation.h" |
| 40 #include "core/page/Chrome.h" | 40 #include "core/page/Chrome.h" |
| 41 #include "core/page/ChromeClient.h" | 41 #include "core/page/ChromeClient.h" |
| 42 #include "core/frame/Frame.h" | 42 #include "core/frame/Frame.h" |
| 43 #include "core/frame/FrameView.h" | 43 #include "core/frame/FrameView.h" |
| 44 #include "core/page/Page.h" | 44 #include "core/page/Page.h" |
| 45 #include "core/page/Settings.h" | 45 #include "core/page/Settings.h" |
| 46 #include "core/frame/animation/AnimationController.h" | 46 #include "core/frame/animation/AnimationController.h" |
| 47 #include "core/page/scrolling/ScrollingConstraints.h" | 47 #include "core/page/scrolling/ScrollingConstraints.h" |
| 48 #include "core/page/scrolling/ScrollingCoordinator.h" | 48 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 49 #include "core/platform/HistogramSupport.h" | |
| 50 #include "core/platform/ScrollbarTheme.h" | 49 #include "core/platform/ScrollbarTheme.h" |
| 51 #include "core/platform/graphics/GraphicsLayer.h" | 50 #include "core/platform/graphics/GraphicsLayer.h" |
| 52 #include "core/platform/graphics/GraphicsLayerClient.h" | 51 #include "core/platform/graphics/GraphicsLayerClient.h" |
| 53 #include "core/rendering/CompositedLayerMapping.h" | 52 #include "core/rendering/CompositedLayerMapping.h" |
| 54 #include "core/rendering/HitTestResult.h" | 53 #include "core/rendering/HitTestResult.h" |
| 55 #include "core/rendering/RenderApplet.h" | 54 #include "core/rendering/RenderApplet.h" |
| 56 #include "core/rendering/RenderEmbeddedObject.h" | 55 #include "core/rendering/RenderEmbeddedObject.h" |
| 57 #include "core/rendering/RenderFullScreen.h" | 56 #include "core/rendering/RenderFullScreen.h" |
| 58 #include "core/rendering/RenderGeometryMap.h" | 57 #include "core/rendering/RenderGeometryMap.h" |
| 59 #include "core/rendering/RenderIFrame.h" | 58 #include "core/rendering/RenderIFrame.h" |
| 60 #include "core/rendering/RenderLayerStackingNode.h" | 59 #include "core/rendering/RenderLayerStackingNode.h" |
| 61 #include "core/rendering/RenderLayerStackingNodeIterator.h" | 60 #include "core/rendering/RenderLayerStackingNodeIterator.h" |
| 62 #include "core/rendering/RenderReplica.h" | 61 #include "core/rendering/RenderReplica.h" |
| 63 #include "core/rendering/RenderVideo.h" | 62 #include "core/rendering/RenderVideo.h" |
| 64 #include "core/rendering/RenderView.h" | 63 #include "core/rendering/RenderView.h" |
| 65 #include "platform/Logging.h" | 64 #include "platform/Logging.h" |
| 66 #include "platform/TraceEvent.h" | 65 #include "platform/TraceEvent.h" |
| 67 #include "platform/geometry/TransformState.h" | 66 #include "platform/geometry/TransformState.h" |
| 67 #include "public/platform/Platform.h" |
| 68 #include "wtf/TemporaryChange.h" | 68 #include "wtf/TemporaryChange.h" |
| 69 | 69 |
| 70 #if !LOG_DISABLED | 70 #if !LOG_DISABLED |
| 71 #include "wtf/CurrentTime.h" | 71 #include "wtf/CurrentTime.h" |
| 72 #endif | 72 #endif |
| 73 | 73 |
| 74 #ifndef NDEBUG | 74 #ifndef NDEBUG |
| 75 #include "core/rendering/RenderTreeAsText.h" | 75 #include "core/rendering/RenderTreeAsText.h" |
| 76 #endif | 76 #endif |
| 77 | 77 |
| (...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1147 overflowControlLayer->removeFromParent(); | 1147 overflowControlLayer->removeFromParent(); |
| 1148 currentCompositedLayerMapping->parentForSublayers()->addChild(ov
erflowControlLayer); | 1148 currentCompositedLayerMapping->parentForSublayers()->addChild(ov
erflowControlLayer); |
| 1149 } | 1149 } |
| 1150 } | 1150 } |
| 1151 | 1151 |
| 1152 childLayersOfEnclosingLayer.append(currentCompositedLayerMapping->childF
orSuperlayers()); | 1152 childLayersOfEnclosingLayer.append(currentCompositedLayerMapping->childF
orSuperlayers()); |
| 1153 } | 1153 } |
| 1154 | 1154 |
| 1155 if (!depth) { | 1155 if (!depth) { |
| 1156 int percentageIncreaseInPixels = static_cast<int>(pixelsAddedByPromoting
AllTransitions / pixelsWithoutPromotingAllTransitions * 100); | 1156 int percentageIncreaseInPixels = static_cast<int>(pixelsAddedByPromoting
AllTransitions / pixelsWithoutPromotingAllTransitions * 100); |
| 1157 HistogramSupport::histogramCustomCounts("Renderer.PixelIncreaseFromTrans
itions", percentageIncreaseInPixels, 0, 1000, 50); | 1157 WebKit::Platform::current()->histogramCustomCounts("Renderer.PixelIncrea
seFromTransitions", percentageIncreaseInPixels, 0, 1000, 50); |
| 1158 } | 1158 } |
| 1159 } | 1159 } |
| 1160 | 1160 |
| 1161 void RenderLayerCompositor::frameViewDidChangeLocation(const IntPoint& contentsO
ffset) | 1161 void RenderLayerCompositor::frameViewDidChangeLocation(const IntPoint& contentsO
ffset) |
| 1162 { | 1162 { |
| 1163 if (m_overflowControlsHostLayer) | 1163 if (m_overflowControlsHostLayer) |
| 1164 m_overflowControlsHostLayer->setPosition(contentsOffset); | 1164 m_overflowControlsHostLayer->setPosition(contentsOffset); |
| 1165 } | 1165 } |
| 1166 | 1166 |
| 1167 void RenderLayerCompositor::frameViewDidChangeSize() | 1167 void RenderLayerCompositor::frameViewDidChangeSize() |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 | 1200 |
| 1201 // Scroll position = scroll minimum + scroll offset. Adjust the layer's | 1201 // Scroll position = scroll minimum + scroll offset. Adjust the layer's |
| 1202 // position to handle whatever the scroll coordinator isn't handling. | 1202 // position to handle whatever the scroll coordinator isn't handling. |
| 1203 // The minimum scroll position is non-zero for RTL pages with overflow. | 1203 // The minimum scroll position is non-zero for RTL pages with overflow. |
| 1204 if (scrollingCoordinatorHandlesOffset) | 1204 if (scrollingCoordinatorHandlesOffset) |
| 1205 m_scrollLayer->setPosition(-frameView->minimumScrollPosition()); | 1205 m_scrollLayer->setPosition(-frameView->minimumScrollPosition()); |
| 1206 else | 1206 else |
| 1207 m_scrollLayer->setPosition(-scrollPosition); | 1207 m_scrollLayer->setPosition(-scrollPosition); |
| 1208 | 1208 |
| 1209 | 1209 |
| 1210 HistogramSupport::histogramEnumeration("Renderer.AcceleratedFixedRootBackgro
und", | 1210 WebKit::Platform::current()->histogramEnumeration("Renderer.AcceleratedFixed
RootBackground", |
| 1211 ScrolledMainFrameBucket, | 1211 ScrolledMainFrameBucket, |
| 1212 AcceleratedFixedRootBackgroundHistogramMax); | 1212 AcceleratedFixedRootBackgroundHistogramMax); |
| 1213 | 1213 |
| 1214 if (!m_renderView->rootBackgroundIsEntirelyFixed()) | 1214 if (!m_renderView->rootBackgroundIsEntirelyFixed()) |
| 1215 return; | 1215 return; |
| 1216 | 1216 |
| 1217 HistogramSupport::histogramEnumeration("Renderer.AcceleratedFixedRootBackgro
und", | 1217 WebKit::Platform::current()->histogramEnumeration("Renderer.AcceleratedFixed
RootBackground", |
| 1218 !!fixedRootBackgroundLayer() | 1218 !!fixedRootBackgroundLayer() |
| 1219 ? ScrolledMainFrameWithAcceleratedFixedRootBackground | 1219 ? ScrolledMainFrameWithAcceleratedFixedRootBackground |
| 1220 : ScrolledMainFrameWithUnacceleratedFixedRootBackground, | 1220 : ScrolledMainFrameWithUnacceleratedFixedRootBackground, |
| 1221 AcceleratedFixedRootBackgroundHistogramMax); | 1221 AcceleratedFixedRootBackgroundHistogramMax); |
| 1222 } | 1222 } |
| 1223 | 1223 |
| 1224 void RenderLayerCompositor::frameViewDidLayout() | 1224 void RenderLayerCompositor::frameViewDidLayout() |
| 1225 { | 1225 { |
| 1226 } | 1226 } |
| 1227 | 1227 |
| (...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2608 } else if (graphicsLayer == m_scrollLayer.get()) { | 2608 } else if (graphicsLayer == m_scrollLayer.get()) { |
| 2609 name = "Frame Scrolling Layer"; | 2609 name = "Frame Scrolling Layer"; |
| 2610 } else { | 2610 } else { |
| 2611 ASSERT_NOT_REACHED(); | 2611 ASSERT_NOT_REACHED(); |
| 2612 } | 2612 } |
| 2613 | 2613 |
| 2614 return name; | 2614 return name; |
| 2615 } | 2615 } |
| 2616 | 2616 |
| 2617 } // namespace WebCore | 2617 } // namespace WebCore |
| OLD | NEW |