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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.h

Issue 1407543003: Preliminary paint property walk implementation for SPv2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #include "wtf/Allocator.h" 59 #include "wtf/Allocator.h"
60 #include "wtf/OwnPtr.h" 60 #include "wtf/OwnPtr.h"
61 61
62 namespace blink { 62 namespace blink {
63 63
64 class FilterEffectBuilder; 64 class FilterEffectBuilder;
65 class FilterOperations; 65 class FilterOperations;
66 class HitTestRequest; 66 class HitTestRequest;
67 class HitTestResult; 67 class HitTestResult;
68 class HitTestingTransformState; 68 class HitTestingTransformState;
69 class ObjectPaintProperties;
70 class PaintLayerCompositor; 69 class PaintLayerCompositor;
71 class CompositedLayerMapping; 70 class CompositedLayerMapping;
72 class ComputedStyle; 71 class ComputedStyle;
73 class TransformationMatrix; 72 class TransformationMatrix;
74 73
75 enum IncludeSelfOrNot { IncludeSelf, ExcludeSelf }; 74 enum IncludeSelfOrNot { IncludeSelf, ExcludeSelf };
76 75
77 enum CompositingQueryMode { 76 enum CompositingQueryMode {
78 CompositingQueriesAreAllowed, 77 CompositingQueriesAreAllowed,
79 CompositingQueriesAreOnlyAllowedInCertainDocumentLifecyclePhases 78 CompositingQueriesAreOnlyAllowedInCertainDocumentLifecyclePhases
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 bool needsRepaint() const { return m_needsRepaint; } 598 bool needsRepaint() const { return m_needsRepaint; }
600 void setNeedsRepaint(); 599 void setNeedsRepaint();
601 void clearNeedsRepaint() { m_needsRepaint = false; } 600 void clearNeedsRepaint() { m_needsRepaint = false; }
602 601
603 IntSize previousScrollOffsetAccumulationForPainting() const { return m_previ ousScrollOffsetAccumulationForPainting; } 602 IntSize previousScrollOffsetAccumulationForPainting() const { return m_previ ousScrollOffsetAccumulationForPainting; }
604 void setPreviousScrollOffsetAccumulationForPainting(const IntSize& s) { m_pr eviousScrollOffsetAccumulationForPainting = s; } 603 void setPreviousScrollOffsetAccumulationForPainting(const IntSize& s) { m_pr eviousScrollOffsetAccumulationForPainting = s; }
605 604
606 // For subsequence display items. 605 // For subsequence display items.
607 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); } 606 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); }
608 607
609 // Paint properties encode the hierarchical transform, clip, scroll, and
pdr. 2015/10/14 17:52:06 Per the discussion above, I think we should keep t
610 // effect information used for painting. Properties should only be changed
611 // during UpdatePaintProperties, and should only be used during Paint.
612 ObjectPaintProperties& mutablePaintProperties();
613 const ObjectPaintProperties* paintProperties() const;
614
615 private: 608 private:
616 // Bounding box in the coordinates of this layer. 609 // Bounding box in the coordinates of this layer.
617 LayoutRect logicalBoundingBox() const; 610 LayoutRect logicalBoundingBox() const;
618 611
619 bool hasOverflowControls() const; 612 bool hasOverflowControls() const;
620 613
621 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 614 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
622 615
623 // Returns true if the position changed. 616 // Returns true if the position changed.
624 bool updateLayerPosition(); 617 bool updateLayerPosition();
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 782
790 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping; 783 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping;
791 OwnPtrWillBePersistent<PaintLayerScrollableArea> m_scrollableArea; 784 OwnPtrWillBePersistent<PaintLayerScrollableArea> m_scrollableArea;
792 785
793 CompositedLayerMapping* m_groupedMapping; 786 CompositedLayerMapping* m_groupedMapping;
794 787
795 PaintLayerClipper m_clipper; // FIXME: Lazily allocate? 788 PaintLayerClipper m_clipper; // FIXME: Lazily allocate?
796 OwnPtr<PaintLayerStackingNode> m_stackingNode; 789 OwnPtr<PaintLayerStackingNode> m_stackingNode;
797 OwnPtr<PaintLayerReflectionInfo> m_reflectionInfo; 790 OwnPtr<PaintLayerReflectionInfo> m_reflectionInfo;
798 791
799 // Lazily-allocated paint properties for m_layoutObject, stored here to
800 // reduce memory usage as PaintLayers are created for all paint property
801 // layout objects.
802 OwnPtr<ObjectPaintProperties> m_paintProperties;
803
804 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of a c omposited layer's composited bounds compared to absolute coordinates. 792 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of a c omposited layer's composited bounds compared to absolute coordinates.
805 793
806 IntSize m_previousScrollOffsetAccumulationForPainting; 794 IntSize m_previousScrollOffsetAccumulationForPainting;
807 }; 795 };
808 796
809 } // namespace blink 797 } // namespace blink
810 798
811 #ifndef NDEBUG 799 #ifndef NDEBUG
812 // Outside the WebCore namespace for ease of invocation from gdb. 800 // Outside the WebCore namespace for ease of invocation from gdb.
813 void showLayerTree(const blink::PaintLayer*); 801 void showLayerTree(const blink::PaintLayer*);
814 void showLayerTree(const blink::LayoutObject*); 802 void showLayerTree(const blink::LayoutObject*);
815 #endif 803 #endif
816 804
817 #endif // Layer_h 805 #endif // Layer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698