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

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

Issue 2484153003: Use an SVGElementProxy in ReferenceClipPathOperation (Closed)
Patch Set: Rebase; fix comments; findElement 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 * version of this file under any of the LGPL, the MPL or the GPL. 42 * version of this file under any of the LGPL, the MPL or the GPL.
43 */ 43 */
44 44
45 #ifndef PaintLayer_h 45 #ifndef PaintLayer_h
46 #define PaintLayer_h 46 #define PaintLayer_h
47 47
48 #include "core/CoreExport.h" 48 #include "core/CoreExport.h"
49 #include "core/layout/ClipRectsCache.h" 49 #include "core/layout/ClipRectsCache.h"
50 #include "core/layout/LayoutBox.h" 50 #include "core/layout/LayoutBox.h"
51 #include "core/paint/PaintLayerClipper.h" 51 #include "core/paint/PaintLayerClipper.h"
52 #include "core/paint/PaintLayerFilterInfo.h"
53 #include "core/paint/PaintLayerFragment.h" 52 #include "core/paint/PaintLayerFragment.h"
53 #include "core/paint/PaintLayerResourceInfo.h"
54 #include "core/paint/PaintLayerScrollableArea.h" 54 #include "core/paint/PaintLayerScrollableArea.h"
55 #include "core/paint/PaintLayerStackingNode.h" 55 #include "core/paint/PaintLayerStackingNode.h"
56 #include "core/paint/PaintLayerStackingNodeIterator.h" 56 #include "core/paint/PaintLayerStackingNodeIterator.h"
57 #include "core/paint/PaintResult.h" 57 #include "core/paint/PaintResult.h"
58 #include "platform/graphics/CompositingReasons.h" 58 #include "platform/graphics/CompositingReasons.h"
59 #include "platform/graphics/SquashingDisallowedReasons.h" 59 #include "platform/graphics/SquashingDisallowedReasons.h"
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>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // If the layer paints into its own backings, this keeps track of the 131 // If the layer paints into its own backings, this keeps track of the
132 // backings. It's nullptr if the layer is not composited or paints into 132 // backings. It's nullptr if the layer is not composited or paints into
133 // grouped backing. 133 // grouped backing.
134 std::unique_ptr<CompositedLayerMapping> compositedLayerMapping; 134 std::unique_ptr<CompositedLayerMapping> compositedLayerMapping;
135 135
136 // If the layer paints into grouped backing (i.e. squashed), this points to 136 // If the layer paints into grouped backing (i.e. squashed), this points to
137 // the grouped CompositedLayerMapping. It's null if the layer is not 137 // the grouped CompositedLayerMapping. It's null if the layer is not
138 // composited or paints into its own backing. 138 // composited or paints into its own backing.
139 CompositedLayerMapping* groupedMapping; 139 CompositedLayerMapping* groupedMapping;
140 140
141 Persistent<PaintLayerFilterInfo> filterInfo; 141 Persistent<PaintLayerResourceInfo> resourceInfo;
142 142
143 // The accumulated subpixel offset of a composited layer's composited bounds 143 // The accumulated subpixel offset of a composited layer's composited bounds
144 // compared to absolute coordinates. 144 // compared to absolute coordinates.
145 LayoutSize subpixelAccumulation; 145 LayoutSize subpixelAccumulation;
146 }; 146 };
147 147
148 // PaintLayer is an old object that handles lots of unrelated operations. 148 // PaintLayer is an old object that handles lots of unrelated operations.
149 // 149 //
150 // We want it to die at some point and be replaced by more focused objects, 150 // We want it to die at some point and be replaced by more focused objects,
151 // which would remove (or at least compartimentalize) a lot of complexity. 151 // which would remove (or at least compartimentalize) a lot of complexity.
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 // Maps "forward" to determine which pixels in a destination rect are 587 // Maps "forward" to determine which pixels in a destination rect are
588 // affected by pixels in the source rect. 588 // affected by pixels in the source rect.
589 // See also FilterEffect::mapRect. 589 // See also FilterEffect::mapRect.
590 FloatRect mapRectForFilter(const FloatRect&) const; 590 FloatRect mapRectForFilter(const FloatRect&) const;
591 591
592 // Calls the above, rounding outwards. 592 // Calls the above, rounding outwards.
593 LayoutRect mapLayoutRectForFilter(const LayoutRect&) const; 593 LayoutRect mapLayoutRectForFilter(const LayoutRect&) const;
594 594
595 bool hasFilterThatMovesPixels() const; 595 bool hasFilterThatMovesPixels() const;
596 596
597 PaintLayerFilterInfo* filterInfo() const { 597 PaintLayerResourceInfo* resourceInfo() const {
598 return m_rareData ? m_rareData->filterInfo.get() : nullptr; 598 return m_rareData ? m_rareData->resourceInfo.get() : nullptr;
599 } 599 }
600 PaintLayerFilterInfo& ensureFilterInfo(); 600 PaintLayerResourceInfo& ensureResourceInfo();
601 void removeFilterInfo();
602 601
603 void updateFilters(const ComputedStyle* oldStyle, 602 void updateFilters(const ComputedStyle* oldStyle,
604 const ComputedStyle& newStyle); 603 const ComputedStyle& newStyle);
604 void updateClipPath(const ComputedStyle* oldStyle,
605 const ComputedStyle& newStyle);
605 606
606 Node* enclosingNode() const; 607 Node* enclosingNode() const;
607 608
608 bool isInTopLayer() const; 609 bool isInTopLayer() const;
609 610
610 bool scrollsWithViewport() const; 611 bool scrollsWithViewport() const;
611 bool scrollsWithRespectTo(const PaintLayer*) const; 612 bool scrollsWithRespectTo(const PaintLayer*) const;
612 613
613 void addLayerHitTestRects(LayerHitTestRects&) const; 614 void addLayerHitTestRects(LayerHitTestRects&) const;
614 615
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 1224
1224 } // namespace blink 1225 } // namespace blink
1225 1226
1226 #ifndef NDEBUG 1227 #ifndef NDEBUG
1227 // Outside the WebCore namespace for ease of invocation from gdb. 1228 // Outside the WebCore namespace for ease of invocation from gdb.
1228 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); 1229 CORE_EXPORT void showLayerTree(const blink::PaintLayer*);
1229 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); 1230 CORE_EXPORT void showLayerTree(const blink::LayoutObject*);
1230 #endif 1231 #endif
1231 1232
1232 #endif // Layer_h 1233 #endif // Layer_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/FilterPainter.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698