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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.h

Issue 1407543003: Preliminary paint property walk implementation for SPv2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert forAllFrameViews change in FrameView.cpp. I don't know what I was thinking. Created 5 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
OLDNEW
1 /* 1 /*
2 Copyright (C) 1997 Martin Jones (mjones@kde.org) 2 Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 (C) 1998 Waldo Bastian (bastian@kde.org) 3 (C) 1998 Waldo Bastian (bastian@kde.org)
4 (C) 1998, 1999 Torben Weis (weis@kde.org) 4 (C) 1998, 1999 Torben Weis (weis@kde.org)
5 (C) 1999 Lars Knoll (knoll@kde.org) 5 (C) 1999 Lars Knoll (knoll@kde.org)
6 (C) 1999 Antti Koivisto (koivisto@kde.org) 6 (C) 1999 Antti Koivisto (koivisto@kde.org)
7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 19 matching lines...) Expand all
30 #include "core/frame/FrameViewAutoSizeInfo.h" 30 #include "core/frame/FrameViewAutoSizeInfo.h"
31 #include "core/frame/LayoutSubtreeRootList.h" 31 #include "core/frame/LayoutSubtreeRootList.h"
32 #include "core/frame/RootFrameViewport.h" 32 #include "core/frame/RootFrameViewport.h"
33 #include "core/layout/LayoutAnalyzer.h" 33 #include "core/layout/LayoutAnalyzer.h"
34 #include "core/paint/PaintPhase.h" 34 #include "core/paint/PaintPhase.h"
35 #include "platform/RuntimeEnabledFeatures.h" 35 #include "platform/RuntimeEnabledFeatures.h"
36 #include "platform/Widget.h" 36 #include "platform/Widget.h"
37 #include "platform/geometry/IntRect.h" 37 #include "platform/geometry/IntRect.h"
38 #include "platform/geometry/LayoutRect.h" 38 #include "platform/geometry/LayoutRect.h"
39 #include "platform/graphics/Color.h" 39 #include "platform/graphics/Color.h"
40 #include "platform/graphics/paint/TransformPaintPropertyNode.h"
40 #include "platform/scroll/ScrollTypes.h" 41 #include "platform/scroll/ScrollTypes.h"
41 #include "platform/scroll/ScrollableArea.h" 42 #include "platform/scroll/ScrollableArea.h"
42 #include "platform/scroll/Scrollbar.h" 43 #include "platform/scroll/Scrollbar.h"
43 #include "public/platform/WebDisplayMode.h" 44 #include "public/platform/WebDisplayMode.h"
44 #include "public/platform/WebRect.h" 45 #include "public/platform/WebRect.h"
45 #include "wtf/Allocator.h" 46 #include "wtf/Allocator.h"
46 #include "wtf/Forward.h" 47 #include "wtf/Forward.h"
47 #include "wtf/HashSet.h" 48 #include "wtf/HashSet.h"
48 #include "wtf/ListHashSet.h" 49 #include "wtf/ListHashSet.h"
49 #include "wtf/OwnPtr.h" 50 #include "wtf/OwnPtr.h"
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 bool frameTimingRequestsDirty() { return m_frameTimingRequestsDirty; } 564 bool frameTimingRequestsDirty() { return m_frameTimingRequestsDirty; }
564 565
565 // Returns true if this frame should not render or schedule visual updates. 566 // Returns true if this frame should not render or schedule visual updates.
566 bool shouldThrottleRendering() const; 567 bool shouldThrottleRendering() const;
567 568
568 // Returns true if this frame could potentially skip rendering and avoid 569 // Returns true if this frame could potentially skip rendering and avoid
569 // scheduling visual updates. 570 // scheduling visual updates.
570 bool canThrottleRendering() const; 571 bool canThrottleRendering() const;
571 bool isHiddenForThrottling() const { return m_hiddenForThrottling; } 572 bool isHiddenForThrottling() const { return m_hiddenForThrottling; }
572 573
574 // Paint properties for SPv2 Only.
575 void setPreTranslation(PassRefPtr<TransformPaintPropertyNode> preTranslation ) { m_preTranslation = preTranslation; }
576 const TransformPaintPropertyNode* preTranslation() const { return m_preTrans lation.get(); }
577
578 void setScrollTranslation(PassRefPtr<TransformPaintPropertyNode> scrollTrans lation) { m_scrollTranslation = scrollTranslation; }
579 const TransformPaintPropertyNode* scrollTranslation() const { return m_scrol lTranslation.get(); }
580
573 protected: 581 protected:
574 // Scroll the content via the compositor. 582 // Scroll the content via the compositor.
575 bool scrollContentsFastPath(const IntSize& scrollDelta); 583 bool scrollContentsFastPath(const IntSize& scrollDelta);
576 584
577 // Scroll the content by invalidating everything. 585 // Scroll the content by invalidating everything.
578 void scrollContentsSlowPath(const IntRect& updateRect); 586 void scrollContentsSlowPath(const IntRect& updateRect);
579 587
580 // These functions are used to create/destroy scrollbars. 588 // These functions are used to create/destroy scrollbars.
581 void setHasHorizontalScrollbar(bool); 589 void setHasHorizontalScrollbar(bool);
582 void setHasVerticalScrollbar(bool); 590 void setHasVerticalScrollbar(bool);
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 // This frame's bounds in the root frame's content coordinates, clipped 868 // This frame's bounds in the root frame's content coordinates, clipped
861 // recursively through every ancestor view. 869 // recursively through every ancestor view.
862 IntRect m_viewportIntersection; 870 IntRect m_viewportIntersection;
863 bool m_viewportIntersectionValid; 871 bool m_viewportIntersectionValid;
864 872
865 // The following members control rendering pipeline throttling for this 873 // The following members control rendering pipeline throttling for this
866 // frame. They are only updated in response to intersection observer 874 // frame. They are only updated in response to intersection observer
867 // notifications, i.e., not in the middle of the lifecycle. 875 // notifications, i.e., not in the middle of the lifecycle.
868 bool m_hiddenForThrottling; 876 bool m_hiddenForThrottling;
869 bool m_crossOriginForThrottling; 877 bool m_crossOriginForThrottling;
878
879 // Paint properties for SPv2 Only.
880 // The hierarchy of transform subtree created by a FrameView.
881 // [ preTranslation ] The offset from Widget::frameRect. Estab lishes viewport.
882 // +---[ scrollTranslation ] Frame scrolling. This is going away in f avor of Settings::rootLayerScrolls.
883 RefPtr<TransformPaintPropertyNode> m_preTranslation;
884 RefPtr<TransformPaintPropertyNode> m_scrollTranslation;
870 }; 885 };
871 886
872 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) 887 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
873 { 888 {
874 if (m_isVisuallyNonEmpty) 889 if (m_isVisuallyNonEmpty)
875 return; 890 return;
876 m_visuallyNonEmptyCharacterCount += count; 891 m_visuallyNonEmptyCharacterCount += count;
877 // Use a threshold value to prevent very small amounts of visible content fr om triggering didMeaningfulLayout. 892 // Use a threshold value to prevent very small amounts of visible content fr om triggering didMeaningfulLayout.
878 // The first few hundred characters rarely contain the interesting content o f the page. 893 // The first few hundred characters rarely contain the interesting content o f the page.
879 static const unsigned visualCharacterThreshold = 200; 894 static const unsigned visualCharacterThreshold = 200;
(...skipping 10 matching lines...) Expand all
890 static const unsigned visualPixelThreshold = 32 * 32; 905 static const unsigned visualPixelThreshold = 32 * 32;
891 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 906 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
892 setIsVisuallyNonEmpty(); 907 setIsVisuallyNonEmpty();
893 } 908 }
894 909
895 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 910 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
896 911
897 } // namespace blink 912 } // namespace blink
898 913
899 #endif // FrameView_h 914 #endif // FrameView_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698