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

Side by Side Diff: Source/core/rendering/RenderLayerStackingNode.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 26 matching lines...) Expand all
37 * version of this file under the LGPL, indicate your decision by 37 * version of this file under the LGPL, indicate your decision by
38 * deletingthe provisions above and replace them with the notice and 38 * deletingthe provisions above and replace them with the notice and
39 * other provisions required by the MPL or the GPL, as the case may be. 39 * other provisions required by the MPL or the GPL, as the case may be.
40 * If you do not delete the provisions above, a recipient may use your 40 * If you do not delete the provisions above, a recipient may use your
41 * version of this file under any of the LGPL, the MPL or the GPL. 41 * version of this file under any of the LGPL, the MPL or the GPL.
42 */ 42 */
43 43
44 #include "config.h" 44 #include "config.h"
45 #include "core/rendering/RenderLayerStackingNode.h" 45 #include "core/rendering/RenderLayerStackingNode.h"
46 46
47 #include "core/platform/HistogramSupport.h"
48 #include "core/rendering/RenderLayer.h" 47 #include "core/rendering/RenderLayer.h"
49 #include "core/rendering/RenderLayerCompositor.h" 48 #include "core/rendering/RenderLayerCompositor.h"
50 #include "core/rendering/RenderView.h" 49 #include "core/rendering/RenderView.h"
50 #include "public/platform/Platform.h"
51 51
52 namespace WebCore { 52 namespace WebCore {
53 53
54 // FIXME: This should not require RenderLayer. There is currently a cycle where 54 // FIXME: This should not require RenderLayer. There is currently a cycle where
55 // in order to determine if we shoulBeNormalFlowOnly() and isStackingContainer() 55 // in order to determine if we shoulBeNormalFlowOnly() and isStackingContainer()
56 // we have to ask the render layer about some of its state. 56 // we have to ask the render layer about some of its state.
57 RenderLayerStackingNode::RenderLayerStackingNode(RenderLayer* layer) 57 RenderLayerStackingNode::RenderLayerStackingNode(RenderLayer* layer)
58 : m_layer(layer) 58 : m_layer(layer)
59 , m_normalFlowListDirty(true) 59 , m_normalFlowListDirty(true)
60 , m_descendantsAreContiguousInStackingOrder(false) 60 , m_descendantsAreContiguousInStackingOrder(false)
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 618
619 bool RenderLayerStackingNode::setNeedsToBeStackingContainer(bool needsToBeStacki ngContainer) 619 bool RenderLayerStackingNode::setNeedsToBeStackingContainer(bool needsToBeStacki ngContainer)
620 { 620 {
621 if (m_needsToBeStackingContainer == needsToBeStackingContainer) 621 if (m_needsToBeStackingContainer == needsToBeStackingContainer)
622 return false; 622 return false;
623 623
624 // Count the total number of RenderLayers which need to be stacking 624 // Count the total number of RenderLayers which need to be stacking
625 // containers some point. This should be recorded at most once per 625 // containers some point. This should be recorded at most once per
626 // RenderLayer, so we check m_needsToBeStackingContainerHasBeenRecorded. 626 // RenderLayer, so we check m_needsToBeStackingContainerHasBeenRecorded.
627 if (layer()->acceleratedCompositingForOverflowScrollEnabled() && !m_needsToB eStackingContainerHasBeenRecorded) { 627 if (layer()->acceleratedCompositingForOverflowScrollEnabled() && !m_needsToB eStackingContainerHasBeenRecorded) {
628 HistogramSupport::histogramEnumeration("Renderer.CompositedScrolling", R enderLayer::NeedsToBeStackingContainerBucket, RenderLayer::CompositedScrollingHi stogramMax); 628 WebKit::Platform::current()->histogramEnumeration("Renderer.CompositedSc rolling", RenderLayer::NeedsToBeStackingContainerBucket, RenderLayer::Composited ScrollingHistogramMax);
629 m_needsToBeStackingContainerHasBeenRecorded = true; 629 m_needsToBeStackingContainerHasBeenRecorded = true;
630 } 630 }
631 631
632 m_needsToBeStackingContainer = needsToBeStackingContainer; 632 m_needsToBeStackingContainer = needsToBeStackingContainer;
633 633
634 return true; 634 return true;
635 } 635 }
636 636
637 RenderLayerStackingNode* RenderLayerStackingNode::ancestorStackingContainerNode( ) const 637 RenderLayerStackingNode* RenderLayerStackingNode::ancestorStackingContainerNode( ) const
638 { 638 {
(...skipping 14 matching lines...) Expand all
653 return ancestor->stackingNode(); 653 return ancestor->stackingNode();
654 return 0; 654 return 0;
655 } 655 }
656 656
657 RenderLayerModelObject* RenderLayerStackingNode::renderer() const 657 RenderLayerModelObject* RenderLayerStackingNode::renderer() const
658 { 658 {
659 return m_layer->renderer(); 659 return m_layer->renderer();
660 } 660 }
661 661
662 } // namespace WebCore 662 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerCompositor.cpp ('k') | Source/core/timing/PerformanceUserTiming.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698