| OLD | NEW |
| 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 30 matching lines...) Expand all Loading... |
| 41 * If you do not delete the provisions above, a recipient may use your | 41 * If you do not delete the provisions above, a recipient may use your |
| 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 SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ | 45 #ifndef SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ |
| 46 #define SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ | 46 #define SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ |
| 47 | 47 |
| 48 #include "sky/engine/core/rendering/LayerPaintingInfo.h" | 48 #include "sky/engine/core/rendering/LayerPaintingInfo.h" |
| 49 #include "sky/engine/core/rendering/RenderBox.h" | 49 #include "sky/engine/core/rendering/RenderBox.h" |
| 50 #include "sky/engine/core/rendering/RenderLayerClipper.h" | 50 #include "sky/engine/core/rendering/RenderLayerClipper.h" |
| 51 #include "sky/engine/core/rendering/RenderLayerFilterInfo.h" | |
| 52 #include "sky/engine/core/rendering/RenderLayerStackingNode.h" | 51 #include "sky/engine/core/rendering/RenderLayerStackingNode.h" |
| 53 #include "sky/engine/core/rendering/RenderLayerStackingNodeIterator.h" | 52 #include "sky/engine/core/rendering/RenderLayerStackingNodeIterator.h" |
| 54 #include "sky/engine/public/platform/WebBlendMode.h" | 53 #include "sky/engine/public/platform/WebBlendMode.h" |
| 55 #include "sky/engine/wtf/OwnPtr.h" | 54 #include "sky/engine/wtf/OwnPtr.h" |
| 56 | 55 |
| 57 namespace blink { | 56 namespace blink { |
| 58 | 57 |
| 59 class FilterEffectRenderer; | 58 class FilterEffectRenderer; |
| 60 class FilterOperations; | 59 class FilterOperations; |
| 61 class HitTestRequest; | 60 class HitTestRequest; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 138 |
| 140 // FIXME: reflections should force transform-style to be flat in the style:
https://bugs.webkit.org/show_bug.cgi?id=106959 | 139 // FIXME: reflections should force transform-style to be flat in the style:
https://bugs.webkit.org/show_bug.cgi?id=106959 |
| 141 bool shouldPreserve3D() const { return renderer()->style()->transformStyle3D
() == TransformStyle3DPreserve3D; } | 140 bool shouldPreserve3D() const { return renderer()->style()->transformStyle3D
() == TransformStyle3DPreserve3D; } |
| 142 | 141 |
| 143 void* operator new(size_t); | 142 void* operator new(size_t); |
| 144 // Only safe to call from RenderBox::destroyLayer() | 143 // Only safe to call from RenderBox::destroyLayer() |
| 145 void operator delete(void*); | 144 void operator delete(void*); |
| 146 | 145 |
| 147 FilterEffectRenderer* filterRenderer() const | 146 FilterEffectRenderer* filterRenderer() const |
| 148 { | 147 { |
| 149 RenderLayerFilterInfo* filterInfo = this->filterInfo(); | 148 return m_filterRenderer.get(); |
| 150 return filterInfo ? filterInfo->renderer() : 0; | |
| 151 } | 149 } |
| 152 | 150 |
| 153 RenderLayerFilterInfo* filterInfo() const { return hasFilterInfo() ? RenderL
ayerFilterInfo::filterInfoForRenderLayer(this) : 0; } | |
| 154 RenderLayerFilterInfo* ensureFilterInfo() { return RenderLayerFilterInfo::cr
eateFilterInfoForRenderLayerIfNeeded(this); } | |
| 155 void removeFilterInfoIfNeeded() | |
| 156 { | |
| 157 if (hasFilterInfo()) | |
| 158 RenderLayerFilterInfo::removeFilterInfoForRenderLayer(this); | |
| 159 } | |
| 160 | |
| 161 bool hasFilterInfo() const { return m_hasFilterInfo; } | |
| 162 void setHasFilterInfo(bool hasFilterInfo) { m_hasFilterInfo = hasFilterInfo;
} | |
| 163 | |
| 164 RenderLayerClipper& clipper() { return m_clipper; } | 151 RenderLayerClipper& clipper() { return m_clipper; } |
| 165 const RenderLayerClipper& clipper() const { return m_clipper; } | 152 const RenderLayerClipper& clipper() const { return m_clipper; } |
| 166 | 153 |
| 167 inline bool isPositionedContainer() const | 154 inline bool isPositionedContainer() const |
| 168 { | 155 { |
| 169 // FIXME: This is not in sync with containingBlock. | 156 // FIXME: This is not in sync with containingBlock. |
| 170 return isRootLayer() || renderer()->isPositioned() || renderer()->hasTra
nsform(); | 157 return isRootLayer() || renderer()->isPositioned() || renderer()->hasTra
nsform(); |
| 171 } | 158 } |
| 172 | 159 |
| 173 void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&,
BorderRadiusClippingRule = IncludeSelfForBorderRadius); | 160 void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&,
BorderRadiusClippingRule = IncludeSelfForBorderRadius); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 196 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov
erflow-only concept. | 183 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov
erflow-only concept. |
| 197 unsigned m_isSelfPaintingLayer : 1; | 184 unsigned m_isSelfPaintingLayer : 1; |
| 198 | 185 |
| 199 const unsigned m_isRootLayer : 1; | 186 const unsigned m_isRootLayer : 1; |
| 200 | 187 |
| 201 unsigned m_3DTransformedDescendantStatusDirty : 1; | 188 unsigned m_3DTransformedDescendantStatusDirty : 1; |
| 202 // Set on a stacking context layer that has 3D descendants anywhere | 189 // Set on a stacking context layer that has 3D descendants anywhere |
| 203 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing. | 190 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing. |
| 204 unsigned m_has3DTransformedDescendant : 1; | 191 unsigned m_has3DTransformedDescendant : 1; |
| 205 | 192 |
| 206 unsigned m_hasFilterInfo : 1; | |
| 207 | |
| 208 RenderBox* m_renderer; | 193 RenderBox* m_renderer; |
| 209 | 194 |
| 210 RenderLayer* m_parent; | 195 RenderLayer* m_parent; |
| 211 RenderLayer* m_previous; | 196 RenderLayer* m_previous; |
| 212 RenderLayer* m_next; | 197 RenderLayer* m_next; |
| 213 RenderLayer* m_first; | 198 RenderLayer* m_first; |
| 214 RenderLayer* m_last; | 199 RenderLayer* m_last; |
| 215 | 200 |
| 216 OwnPtr<TransformationMatrix> m_transform; | 201 OwnPtr<TransformationMatrix> m_transform; |
| 202 OwnPtr<FilterEffectRenderer> m_filterRenderer; |
| 217 | 203 |
| 218 RenderLayerClipper m_clipper; // FIXME: Lazily allocate? | 204 RenderLayerClipper m_clipper; // FIXME: Lazily allocate? |
| 219 OwnPtr<RenderLayerStackingNode> m_stackingNode; | 205 OwnPtr<RenderLayerStackingNode> m_stackingNode; |
| 220 }; | 206 }; |
| 221 | 207 |
| 222 } // namespace blink | 208 } // namespace blink |
| 223 | 209 |
| 224 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ | 210 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ |
| OLD | NEW |