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

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

Issue 1390933003: Implement the framework for the paint property hierarchy (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;
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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 bool needsRepaint() const { return m_needsRepaint; } 569 bool needsRepaint() const { return m_needsRepaint; }
569 void setNeedsRepaint(); 570 void setNeedsRepaint();
570 void clearNeedsRepaint() { m_needsRepaint = false; } 571 void clearNeedsRepaint() { m_needsRepaint = false; }
571 572
572 IntSize previousScrollOffsetAccumulationForPainting() const { return m_previ ousScrollOffsetAccumulationForPainting; } 573 IntSize previousScrollOffsetAccumulationForPainting() const { return m_previ ousScrollOffsetAccumulationForPainting; }
573 void setPreviousScrollOffsetAccumulationForPainting(const IntSize& s) { m_pr eviousScrollOffsetAccumulationForPainting = s; } 574 void setPreviousScrollOffsetAccumulationForPainting(const IntSize& s) { m_pr eviousScrollOffsetAccumulationForPainting = s; }
574 575
575 // For subsequence display items. 576 // For subsequence display items.
576 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); } 577 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); }
577 578
579 // Paint properties encode the hierarchical transform, clip, scroll, and
580 // effect information used for painting. Properties should only be set
581 // during UpdatePaintProperties, and should only be accessed during Paint.
582 void setPaintProperties(PassOwnPtr<ObjectPaintProperties>);
583 const ObjectPaintProperties* paintProperties() const;
584
578 private: 585 private:
579 // Bounding box in the coordinates of this layer. 586 // Bounding box in the coordinates of this layer.
580 LayoutRect logicalBoundingBox() const; 587 LayoutRect logicalBoundingBox() const;
581 588
582 bool hasOverflowControls() const; 589 bool hasOverflowControls() const;
583 590
584 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 591 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
585 592
586 // Returns true if the position changed. 593 // Returns true if the position changed.
587 bool updateLayerPosition(); 594 bool updateLayerPosition();
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 759
753 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping; 760 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping;
754 OwnPtrWillBePersistent<PaintLayerScrollableArea> m_scrollableArea; 761 OwnPtrWillBePersistent<PaintLayerScrollableArea> m_scrollableArea;
755 762
756 CompositedLayerMapping* m_groupedMapping; 763 CompositedLayerMapping* m_groupedMapping;
757 764
758 PaintLayerClipper m_clipper; // FIXME: Lazily allocate? 765 PaintLayerClipper m_clipper; // FIXME: Lazily allocate?
759 OwnPtr<PaintLayerStackingNode> m_stackingNode; 766 OwnPtr<PaintLayerStackingNode> m_stackingNode;
760 OwnPtr<PaintLayerReflectionInfo> m_reflectionInfo; 767 OwnPtr<PaintLayerReflectionInfo> m_reflectionInfo;
761 768
769 // Lazily-allocated paint properties for m_layoutObject.
770 OwnPtr<ObjectPaintProperties> m_paintProperties;
771
762 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of a c omposited layer's composited bounds compared to absolute coordinates. 772 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of a c omposited layer's composited bounds compared to absolute coordinates.
763 773
764 IntSize m_previousScrollOffsetAccumulationForPainting; 774 IntSize m_previousScrollOffsetAccumulationForPainting;
765 }; 775 };
766 776
767 } // namespace blink 777 } // namespace blink
768 778
769 #ifndef NDEBUG 779 #ifndef NDEBUG
770 // Outside the WebCore namespace for ease of invocation from gdb. 780 // Outside the WebCore namespace for ease of invocation from gdb.
771 void showLayerTree(const blink::PaintLayer*); 781 void showLayerTree(const blink::PaintLayer*);
772 void showLayerTree(const blink::LayoutObject*); 782 void showLayerTree(const blink::LayoutObject*);
773 #endif 783 #endif
774 784
775 #endif // Layer_h 785 #endif // Layer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698