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

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

Issue 44453002: Remove HistogramSupport abstraction layer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #include "core/dom/shadow/ShadowRoot.h" 53 #include "core/dom/shadow/ShadowRoot.h"
54 #include "core/html/HTMLFrameElement.h" 54 #include "core/html/HTMLFrameElement.h"
55 #include "core/html/HTMLFrameOwnerElement.h" 55 #include "core/html/HTMLFrameOwnerElement.h"
56 #include "core/frame/Frame.h" 56 #include "core/frame/Frame.h"
57 #include "core/frame/FrameView.h" 57 #include "core/frame/FrameView.h"
58 #include "core/page/Page.h" 58 #include "core/page/Page.h"
59 #include "core/page/Settings.h" 59 #include "core/page/Settings.h"
60 #include "core/page/UseCounter.h" 60 #include "core/page/UseCounter.h"
61 #include "core/frame/animation/AnimationController.h" 61 #include "core/frame/animation/AnimationController.h"
62 #include "core/page/scrolling/ScrollingCoordinator.h" 62 #include "core/page/scrolling/ScrollingCoordinator.h"
63 #include "core/platform/HistogramSupport.h"
64 #include "core/platform/graphics/GraphicsContextStateSaver.h" 63 #include "core/platform/graphics/GraphicsContextStateSaver.h"
65 #include "core/platform/graphics/filters/ReferenceFilter.h" 64 #include "core/platform/graphics/filters/ReferenceFilter.h"
66 #include "core/platform/graphics/filters/SourceGraphic.h" 65 #include "core/platform/graphics/filters/SourceGraphic.h"
67 #include "core/platform/graphics/filters/custom/CustomFilterGlobalContext.h" 66 #include "core/platform/graphics/filters/custom/CustomFilterGlobalContext.h"
68 #include "core/platform/graphics/filters/custom/CustomFilterOperation.h" 67 #include "core/platform/graphics/filters/custom/CustomFilterOperation.h"
69 #include "core/platform/graphics/filters/custom/CustomFilterValidatedProgram.h" 68 #include "core/platform/graphics/filters/custom/CustomFilterValidatedProgram.h"
70 #include "core/platform/graphics/filters/custom/ValidatedCustomFilterOperation.h " 69 #include "core/platform/graphics/filters/custom/ValidatedCustomFilterOperation.h "
71 #include "core/platform/graphics/transforms/ScaleTransformOperation.h" 70 #include "core/platform/graphics/transforms/ScaleTransformOperation.h"
72 #include "core/platform/graphics/transforms/TranslateTransformOperation.h" 71 #include "core/platform/graphics/transforms/TranslateTransformOperation.h"
73 #include "core/rendering/ColumnInfo.h" 72 #include "core/rendering/ColumnInfo.h"
(...skipping 13 matching lines...) Expand all
87 #include "core/rendering/RenderTreeAsText.h" 86 #include "core/rendering/RenderTreeAsText.h"
88 #include "core/rendering/RenderView.h" 87 #include "core/rendering/RenderView.h"
89 #include "core/rendering/svg/ReferenceFilterBuilder.h" 88 #include "core/rendering/svg/ReferenceFilterBuilder.h"
90 #include "core/rendering/svg/RenderSVGResourceClipper.h" 89 #include "core/rendering/svg/RenderSVGResourceClipper.h"
91 #include "platform/LengthFunctions.h" 90 #include "platform/LengthFunctions.h"
92 #include "platform/Partitions.h" 91 #include "platform/Partitions.h"
93 #include "platform/TraceEvent.h" 92 #include "platform/TraceEvent.h"
94 #include "platform/geometry/FloatPoint3D.h" 93 #include "platform/geometry/FloatPoint3D.h"
95 #include "platform/geometry/FloatRect.h" 94 #include "platform/geometry/FloatRect.h"
96 #include "platform/transforms/TransformationMatrix.h" 95 #include "platform/transforms/TransformationMatrix.h"
96 #include "public/platform/Platform.h"
97 #include "wtf/StdLibExtras.h" 97 #include "wtf/StdLibExtras.h"
98 #include "wtf/UnusedParam.h" 98 #include "wtf/UnusedParam.h"
99 #include "wtf/text/CString.h" 99 #include "wtf/text/CString.h"
100 100
101 #define MIN_INTERSECT_FOR_REVEAL 32 101 #define MIN_INTERSECT_FOR_REVEAL 32
102 102
103 using namespace std; 103 using namespace std;
104 104
105 namespace WebCore { 105 namespace WebCore {
106 106
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
1769 const bool needsToBeStackingContainerDidChange = m_stackingNode->setNeedsToB eStackingContainer(needsToBeStackingContainer); 1769 const bool needsToBeStackingContainerDidChange = m_stackingNode->setNeedsToB eStackingContainer(needsToBeStackingContainer);
1770 1770
1771 const bool needsCompositedScrolling = needsToBeStackingContainer 1771 const bool needsCompositedScrolling = needsToBeStackingContainer
1772 || compositorDrivenAcceleratedScrollingEnabled(); 1772 || compositorDrivenAcceleratedScrollingEnabled();
1773 1773
1774 // We gather a boolean value for use with Google UMA histograms to 1774 // We gather a boolean value for use with Google UMA histograms to
1775 // quantify the actual effects of a set of patches attempting to 1775 // quantify the actual effects of a set of patches attempting to
1776 // relax composited scrolling requirements, thereby increasing the 1776 // relax composited scrolling requirements, thereby increasing the
1777 // number of composited overflow divs. 1777 // number of composited overflow divs.
1778 if (acceleratedCompositingForOverflowScrollEnabled()) 1778 if (acceleratedCompositingForOverflowScrollEnabled())
1779 HistogramSupport::histogramEnumeration("Renderer.NeedsCompositedScrollin g", needsCompositedScrolling, 2); 1779 WebKit::Platform::current()->histogramEnumeration("Renderer.NeedsComposi tedScrolling", needsCompositedScrolling, 2);
1780 1780
1781 const bool needsCompositedScrollingDidChange = setNeedsCompositedScrolling(n eedsCompositedScrolling); 1781 const bool needsCompositedScrollingDidChange = setNeedsCompositedScrolling(n eedsCompositedScrolling);
1782 1782
1783 if (needsToBeStackingContainerDidChange || needsCompositedScrollingDidChange ) { 1783 if (needsToBeStackingContainerDidChange || needsCompositedScrollingDidChange ) {
1784 // Note, the z-order lists may need to be rebuilt, but our code guarante es 1784 // Note, the z-order lists may need to be rebuilt, but our code guarante es
1785 // that we have not affected stacking, so we will not dirty 1785 // that we have not affected stacking, so we will not dirty
1786 // m_descendantsAreContiguousInStackingOrder for either us or our stacki ng 1786 // m_descendantsAreContiguousInStackingOrder for either us or our stacki ng
1787 // context or container. 1787 // context or container.
1788 didUpdateNeedsCompositedScrolling(); 1788 didUpdateNeedsCompositedScrolling();
1789 } 1789 }
1790 } 1790 }
1791 1791
1792 bool RenderLayer::setNeedsCompositedScrolling(bool needsCompositedScrolling) 1792 bool RenderLayer::setNeedsCompositedScrolling(bool needsCompositedScrolling)
1793 { 1793 {
1794 if (m_needsCompositedScrolling == needsCompositedScrolling) 1794 if (m_needsCompositedScrolling == needsCompositedScrolling)
1795 return false; 1795 return false;
1796 1796
1797 // Count the total number of RenderLayers which need composited scrolling at 1797 // Count the total number of RenderLayers which need composited scrolling at
1798 // some point. This should be recorded at most once per RenderLayer, so we 1798 // some point. This should be recorded at most once per RenderLayer, so we
1799 // check m_willUseCompositedScrollingHasBeenRecorded. 1799 // check m_willUseCompositedScrollingHasBeenRecorded.
1800 if (acceleratedCompositingForOverflowScrollEnabled() && !m_willUseComposited ScrollingHasBeenRecorded) { 1800 if (acceleratedCompositingForOverflowScrollEnabled() && !m_willUseComposited ScrollingHasBeenRecorded) {
1801 HistogramSupport::histogramEnumeration("Renderer.CompositedScrolling", W illUseCompositedScrollingBucket, CompositedScrollingHistogramMax); 1801 WebKit::Platform::current()->histogramEnumeration("Renderer.CompositedSc rolling", WillUseCompositedScrollingBucket, CompositedScrollingHistogramMax);
1802 m_willUseCompositedScrollingHasBeenRecorded = true; 1802 m_willUseCompositedScrollingHasBeenRecorded = true;
1803 } 1803 }
1804 1804
1805 m_needsCompositedScrolling = needsCompositedScrolling; 1805 m_needsCompositedScrolling = needsCompositedScrolling;
1806 1806
1807 return true; 1807 return true;
1808 } 1808 }
1809 1809
1810 void RenderLayer::setForceNeedsCompositedScrolling(RenderLayer::ForceNeedsCompos itedScrollingMode mode) 1810 void RenderLayer::setForceNeedsCompositedScrolling(RenderLayer::ForceNeedsCompos itedScrollingMode mode)
1811 { 1811 {
(...skipping 2517 matching lines...) Expand 10 before | Expand all | Expand 10 after
4329 updatedScrollableAreaSet = true; 4329 updatedScrollableAreaSet = true;
4330 } else { 4330 } else {
4331 if (frameView->removeScrollableArea(scrollableArea())) 4331 if (frameView->removeScrollableArea(scrollableArea()))
4332 updatedScrollableAreaSet = true; 4332 updatedScrollableAreaSet = true;
4333 } 4333 }
4334 4334
4335 if (updatedScrollableAreaSet) { 4335 if (updatedScrollableAreaSet) {
4336 // Count the total number of RenderLayers that are scrollable areas for 4336 // Count the total number of RenderLayers that are scrollable areas for
4337 // any period. We only want to record this at most once per RenderLayer. 4337 // any period. We only want to record this at most once per RenderLayer.
4338 if (requiresScrollableArea && !m_isScrollableAreaHasBeenRecorded) { 4338 if (requiresScrollableArea && !m_isScrollableAreaHasBeenRecorded) {
4339 HistogramSupport::histogramEnumeration("Renderer.CompositedScrolling ", IsScrollableAreaBucket, CompositedScrollingHistogramMax); 4339 WebKit::Platform::current()->histogramEnumeration("Renderer.Composit edScrolling", IsScrollableAreaBucket, CompositedScrollingHistogramMax);
4340 m_isScrollableAreaHasBeenRecorded = true; 4340 m_isScrollableAreaHasBeenRecorded = true;
4341 } 4341 }
4342 4342
4343 // We always want composited scrolling if compositor driven accelerated 4343 // We always want composited scrolling if compositor driven accelerated
4344 // scrolling is enabled. Since we will not update needs composited scrol ling 4344 // scrolling is enabled. Since we will not update needs composited scrol ling
4345 // in this case, we must force our state to update. 4345 // in this case, we must force our state to update.
4346 if (compositorDrivenAcceleratedScrollingEnabled()) 4346 if (compositorDrivenAcceleratedScrollingEnabled())
4347 didUpdateNeedsCompositedScrolling(); 4347 didUpdateNeedsCompositedScrolling();
4348 else if (requiresScrollableArea) 4348 else if (requiresScrollableArea)
4349 compositor()->setNeedsUpdateCompositingRequirementsState(); 4349 compositor()->setNeedsUpdateCompositingRequirementsState();
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
4603 } 4603 }
4604 } 4604 }
4605 4605
4606 void showLayerTree(const WebCore::RenderObject* renderer) 4606 void showLayerTree(const WebCore::RenderObject* renderer)
4607 { 4607 {
4608 if (!renderer) 4608 if (!renderer)
4609 return; 4609 return;
4610 showLayerTree(renderer->enclosingLayer()); 4610 showLayerTree(renderer->enclosingLayer());
4611 } 4611 }
4612 #endif 4612 #endif
OLDNEW
« no previous file with comments | « Source/core/platform/chromium/HistogramSupportChromium.cpp ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698