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

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

Issue 2401343002: Tracking filter mutation via SVGElementProxy (Closed)
Patch Set: Fix fullscreen Created 4 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) 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "wtf/Allocator.h" 60 #include "wtf/Allocator.h"
61 #include "wtf/AutoReset.h" 61 #include "wtf/AutoReset.h"
62 #include "wtf/PtrUtil.h" 62 #include "wtf/PtrUtil.h"
63 #include <memory> 63 #include <memory>
64 64
65 namespace blink { 65 namespace blink {
66 66
67 class CompositedLayerMapping; 67 class CompositedLayerMapping;
68 class CompositorFilterOperations; 68 class CompositorFilterOperations;
69 class ComputedStyle; 69 class ComputedStyle;
70 class FilterEffect;
70 class FilterOperations; 71 class FilterOperations;
71 class HitTestRequest; 72 class HitTestRequest;
72 class HitTestResult; 73 class HitTestResult;
73 class HitTestingTransformState; 74 class HitTestingTransformState;
74 class PaintLayerCompositor; 75 class PaintLayerCompositor;
75 class PaintTiming; 76 class PaintTiming;
76 class TransformationMatrix; 77 class TransformationMatrix;
77 78
78 enum IncludeSelfOrNot { IncludeSelf, ExcludeSelf }; 79 enum IncludeSelfOrNot { IncludeSelf, ExcludeSelf };
79 80
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 !m_rareData->transform->isAffine(); 476 !m_rareData->transform->isAffine();
476 } 477 }
477 478
478 // FIXME: reflections should force transform-style to be flat in the style: 479 // FIXME: reflections should force transform-style to be flat in the style:
479 // https://bugs.webkit.org/show_bug.cgi?id=106959 480 // https://bugs.webkit.org/show_bug.cgi?id=106959
480 bool shouldPreserve3D() const { 481 bool shouldPreserve3D() const {
481 return !layoutObject()->hasReflection() && 482 return !layoutObject()->hasReflection() &&
482 layoutObject()->style()->preserves3D(); 483 layoutObject()->style()->preserves3D();
483 } 484 }
484 485
485 void filterNeedsPaintInvalidation();
486
487 // Returns |true| if any property that renders using filter operations is 486 // Returns |true| if any property that renders using filter operations is
488 // used (including, but not limited to, 'filter' and 'box-reflect'). 487 // used (including, but not limited to, 'filter' and 'box-reflect').
489 bool hasFilterInducingProperty() const { 488 bool hasFilterInducingProperty() const {
490 return layoutObject()->hasFilterInducingProperty(); 489 return layoutObject()->hasFilterInducingProperty();
491 } 490 }
492 491
493 void* operator new(size_t); 492 void* operator new(size_t);
494 // Only safe to call from LayoutBoxModelObject::destroyLayer() 493 // Only safe to call from LayoutBoxModelObject::destroyLayer()
495 void operator delete(void*); 494 void operator delete(void*);
496 495
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 586
588 // Calls the above, rounding outwards. 587 // Calls the above, rounding outwards.
589 LayoutRect mapLayoutRectForFilter(const LayoutRect&) const; 588 LayoutRect mapLayoutRectForFilter(const LayoutRect&) const;
590 589
591 bool hasFilterThatMovesPixels() const; 590 bool hasFilterThatMovesPixels() const;
592 591
593 PaintLayerFilterInfo* filterInfo() const { 592 PaintLayerFilterInfo* filterInfo() const {
594 return m_rareData ? m_rareData->filterInfo.get() : nullptr; 593 return m_rareData ? m_rareData->filterInfo.get() : nullptr;
595 } 594 }
596 PaintLayerFilterInfo& ensureFilterInfo(); 595 PaintLayerFilterInfo& ensureFilterInfo();
596 void removeFilterInfo();
597 597
598 void updateFilters(const ComputedStyle* oldStyle, 598 void updateFilters(const ComputedStyle* oldStyle,
599 const ComputedStyle& newStyle); 599 const ComputedStyle& newStyle);
600 600
601 Node* enclosingNode() const; 601 Node* enclosingNode() const;
602 602
603 bool isInTopLayer() const; 603 bool isInTopLayer() const;
604 604
605 bool scrollsWithViewport() const; 605 bool scrollsWithViewport() const;
606 bool scrollsWithRespectTo(const PaintLayer*) const; 606 bool scrollsWithRespectTo(const PaintLayer*) const;
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 void setHasCompositingDescendant(bool); 819 void setHasCompositingDescendant(bool);
820 820
821 bool shouldIsolateCompositedDescendants() const { 821 bool shouldIsolateCompositedDescendants() const {
822 DCHECK(isAllowedToQueryCompositingState()); 822 DCHECK(isAllowedToQueryCompositingState());
823 return m_shouldIsolateCompositedDescendants; 823 return m_shouldIsolateCompositedDescendants;
824 } 824 }
825 void setShouldIsolateCompositedDescendants(bool); 825 void setShouldIsolateCompositedDescendants(bool);
826 826
827 void updateDescendantDependentFlags(); 827 void updateDescendantDependentFlags();
828 828
829 void updateOrRemoveFilterEffect();
830
831 void updateSelfPaintingLayer(); 829 void updateSelfPaintingLayer();
832 // This is O(depth) so avoid calling this in loops. Instead use optimizations 830 // This is O(depth) so avoid calling this in loops. Instead use optimizations
833 // like those in PaintInvalidationState. 831 // like those in PaintInvalidationState.
834 PaintLayer* enclosingSelfPaintingLayer(); 832 PaintLayer* enclosingSelfPaintingLayer();
835 833
836 PaintLayer* enclosingTransformedAncestor() const; 834 PaintLayer* enclosingTransformedAncestor() const;
837 LayoutPoint computeOffsetFromTransformedAncestor() const; 835 LayoutPoint computeOffsetFromTransformedAncestor() const;
838 836
839 void didUpdateNeedsCompositedScrolling(); 837 void didUpdateNeedsCompositedScrolling();
840 838
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 1071
1074 bool childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const; 1072 bool childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const;
1075 1073
1076 bool shouldBeSelfPaintingLayer() const; 1074 bool shouldBeSelfPaintingLayer() const;
1077 1075
1078 // FIXME: We should only create the stacking node if needed. 1076 // FIXME: We should only create the stacking node if needed.
1079 bool requiresStackingNode() const { return true; } 1077 bool requiresStackingNode() const { return true; }
1080 void updateStackingNode(); 1078 void updateStackingNode();
1081 1079
1082 FilterOperations addReflectionToFilterOperations(const ComputedStyle&) const; 1080 FilterOperations addReflectionToFilterOperations(const ComputedStyle&) const;
1083 FilterEffect* updateFilterEffect() const;
1084 1081
1085 // FIXME: We could lazily allocate our ScrollableArea based on style 1082 // FIXME: We could lazily allocate our ScrollableArea based on style
1086 // properties ('overflow', ...) but for now, we are always allocating it for 1083 // properties ('overflow', ...) but for now, we are always allocating it for
1087 // LayoutBox as it's safer. crbug.com/467721. 1084 // LayoutBox as it's safer. crbug.com/467721.
1088 bool requiresScrollableArea() const { return layoutBox(); } 1085 bool requiresScrollableArea() const { return layoutBox(); }
1089 void updateScrollableArea(); 1086 void updateScrollableArea();
1090 1087
1091 void dirtyAncestorChainVisibleDescendantStatus(); 1088 void dirtyAncestorChainVisibleDescendantStatus();
1092 1089
1093 bool attemptDirectCompositingUpdate(StyleDifference, 1090 bool attemptDirectCompositingUpdate(StyleDifference,
1094 const ComputedStyle* oldStyle); 1091 const ComputedStyle* oldStyle);
1095 void updateTransform(const ComputedStyle* oldStyle, 1092 void updateTransform(const ComputedStyle* oldStyle,
1096 const ComputedStyle& newStyle); 1093 const ComputedStyle& newStyle);
1097 1094
1098 void removeAncestorOverflowLayer(const PaintLayer* removedLayer); 1095 void removeAncestorOverflowLayer(const PaintLayer* removedLayer);
1099 1096
1100 void updateOrRemoveFilterClients();
1101
1102 void updatePaginationRecursive(bool needsPaginationUpdate = false); 1097 void updatePaginationRecursive(bool needsPaginationUpdate = false);
1103 void clearPaginationRecursive(); 1098 void clearPaginationRecursive();
1104 1099
1105 void setNeedsRepaintInternal(); 1100 void setNeedsRepaintInternal();
1106 void markCompositingContainerChainForNeedsRepaint(); 1101 void markCompositingContainerChainForNeedsRepaint();
1107 1102
1108 PaintLayerRareData& ensureRareData() { 1103 PaintLayerRareData& ensureRareData() {
1109 if (!m_rareData) 1104 if (!m_rareData)
1110 m_rareData = wrapUnique(new PaintLayerRareData); 1105 m_rareData = wrapUnique(new PaintLayerRareData);
1111 return *m_rareData; 1106 return *m_rareData;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 1232
1238 } // namespace blink 1233 } // namespace blink
1239 1234
1240 #ifndef NDEBUG 1235 #ifndef NDEBUG
1241 // Outside the WebCore namespace for ease of invocation from gdb. 1236 // Outside the WebCore namespace for ease of invocation from gdb.
1242 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); 1237 CORE_EXPORT void showLayerTree(const blink::PaintLayer*);
1243 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); 1238 CORE_EXPORT void showLayerTree(const blink::LayoutObject*);
1244 #endif 1239 #endif
1245 1240
1246 #endif // Layer_h 1241 #endif // Layer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698