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

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

Issue 1397583002: Implement the framework for a paint property hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Job insecurity: better tests, better comments, better names. 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;
69 class PaintLayerCompositor; 70 class PaintLayerCompositor;
70 class CompositedLayerMapping; 71 class CompositedLayerMapping;
71 class ComputedStyle; 72 class ComputedStyle;
72 class TransformationMatrix; 73 class TransformationMatrix;
73 74
74 enum IncludeSelfOrNot { IncludeSelf, ExcludeSelf }; 75 enum IncludeSelfOrNot { IncludeSelf, ExcludeSelf };
75 76
76 enum CompositingQueryMode { 77 enum CompositingQueryMode {
77 CompositingQueriesAreAllowed, 78 CompositingQueriesAreAllowed,
78 CompositingQueriesAreOnlyAllowedInCertainDocumentLifecyclePhases 79 CompositingQueriesAreOnlyAllowedInCertainDocumentLifecyclePhases
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 bool needsRepaint() const { return m_needsRepaint; } 562 bool needsRepaint() const { return m_needsRepaint; }
562 void setNeedsRepaint(); 563 void setNeedsRepaint();
563 void clearNeedsRepaint() { m_needsRepaint = false; } 564 void clearNeedsRepaint() { m_needsRepaint = false; }
564 565
565 IntSize previousScrollOffsetAccumulationForPainting() const { return m_previ ousScrollOffsetAccumulationForPainting; } 566 IntSize previousScrollOffsetAccumulationForPainting() const { return m_previ ousScrollOffsetAccumulationForPainting; }
566 void setPreviousScrollOffsetAccumulationForPainting(const IntSize& s) { m_pr eviousScrollOffsetAccumulationForPainting = s; } 567 void setPreviousScrollOffsetAccumulationForPainting(const IntSize& s) { m_pr eviousScrollOffsetAccumulationForPainting = s; }
567 568
568 // For subsequence display items. 569 // For subsequence display items.
569 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); } 570 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); }
570 571
572 // Paint properties encode the hierarchical transform, clip, scroll, and
573 // effect information used for painting. Properties should only be changed
574 // during UpdatePaintProperties, and should only be used during Paint.
575 ObjectPaintProperties& mutablePaintProperties();
576 const ObjectPaintProperties* paintProperties() const;
577
571 private: 578 private:
572 // Bounding box in the coordinates of this layer. 579 // Bounding box in the coordinates of this layer.
573 LayoutRect logicalBoundingBox() const; 580 LayoutRect logicalBoundingBox() const;
574 581
575 bool hasOverflowControls() const; 582 bool hasOverflowControls() const;
576 583
577 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 584 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
578 585
579 // Returns true if the position changed. 586 // Returns true if the position changed.
580 bool updateLayerPosition(); 587 bool updateLayerPosition();
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 752
746 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping; 753 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping;
747 OwnPtrWillBePersistent<PaintLayerScrollableArea> m_scrollableArea; 754 OwnPtrWillBePersistent<PaintLayerScrollableArea> m_scrollableArea;
748 755
749 CompositedLayerMapping* m_groupedMapping; 756 CompositedLayerMapping* m_groupedMapping;
750 757
751 PaintLayerClipper m_clipper; // FIXME: Lazily allocate? 758 PaintLayerClipper m_clipper; // FIXME: Lazily allocate?
752 OwnPtr<PaintLayerStackingNode> m_stackingNode; 759 OwnPtr<PaintLayerStackingNode> m_stackingNode;
753 OwnPtr<PaintLayerReflectionInfo> m_reflectionInfo; 760 OwnPtr<PaintLayerReflectionInfo> m_reflectionInfo;
754 761
762 // Lazily-allocated paint properties for m_layoutObject, stored here to
763 // reduce memory usage as PaintLayers are created for all paint property
764 // layout objects.
765 OwnPtr<ObjectPaintProperties> m_paintProperties;
766
755 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of a c omposited layer's composited bounds compared to absolute coordinates. 767 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of a c omposited layer's composited bounds compared to absolute coordinates.
756 768
757 IntSize m_previousScrollOffsetAccumulationForPainting; 769 IntSize m_previousScrollOffsetAccumulationForPainting;
758 }; 770 };
759 771
760 } // namespace blink 772 } // namespace blink
761 773
762 #ifndef NDEBUG 774 #ifndef NDEBUG
763 // Outside the WebCore namespace for ease of invocation from gdb. 775 // Outside the WebCore namespace for ease of invocation from gdb.
764 void showLayerTree(const blink::PaintLayer*); 776 void showLayerTree(const blink::PaintLayer*);
765 void showLayerTree(const blink::LayoutObject*); 777 void showLayerTree(const blink::LayoutObject*);
766 #endif 778 #endif
767 779
768 #endif // Layer_h 780 #endif // Layer_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ObjectPaintProperties.h ('k') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698