| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutRect&) con
st; | 150 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutRect&) con
st; |
| 151 | 151 |
| 152 // The two main functions that use the layer system. The paint method | 152 // The two main functions that use the layer system. The paint method |
| 153 // paints the layers that intersect the damage rect from back to | 153 // paints the layers that intersect the damage rect from back to |
| 154 // front. The hitTest method looks for mouse events by walking | 154 // front. The hitTest method looks for mouse events by walking |
| 155 // layers that intersect the point from front to back. | 155 // layers that intersect the point from front to back. |
| 156 // paint() assumes that the caller will clip to the bounds of damageRect if
necessary. | 156 // paint() assumes that the caller will clip to the bounds of damageRect if
necessary. |
| 157 void paint(GraphicsContext*, const LayoutRect& damageRect, RenderObject* pai
ntingRoot = 0); | 157 void paint(GraphicsContext*, const LayoutRect& damageRect, RenderObject* pai
ntingRoot = 0); |
| 158 bool hitTest(const HitTestRequest&, HitTestResult&); | 158 bool hitTest(const HitTestRequest&, HitTestResult&); |
| 159 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); | 159 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); |
| 160 void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect,
RenderObject* paintingRoot = 0); | |
| 161 | 160 |
| 162 // Pass offsetFromRoot if known. | 161 // Pass offsetFromRoot if known. |
| 163 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d
amageRect, const RenderLayer* rootLayer, const LayoutPoint* offsetFromRoot = 0)
const; | 162 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d
amageRect, const RenderLayer* rootLayer, const LayoutPoint* offsetFromRoot = 0)
const; |
| 164 | 163 |
| 165 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know
n. | 164 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know
n. |
| 166 LayoutRect physicalBoundingBox(const RenderLayer* ancestorLayer, const Layou
tPoint* offsetFromRoot = 0) const; | 165 LayoutRect physicalBoundingBox(const RenderLayer* ancestorLayer, const Layou
tPoint* offsetFromRoot = 0) const; |
| 167 LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const R
enderLayer* ancestorLayer, const LayoutPoint& offsetFromRoot) const; | 166 LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const R
enderLayer* ancestorLayer, const LayoutPoint& offsetFromRoot) const; |
| 168 | 167 |
| 169 // FIXME: This function is inconsistent as to whether the returned rect has
been flipped for writing mode. | 168 // FIXME: This function is inconsistent as to whether the returned rect has
been flipped for writing mode. |
| 170 LayoutRect boundingBoxForCompositingOverlapTest() const { return overlapBoun
dsIncludeChildren() ? boundingBoxForCompositing() : logicalBoundingBox(); } | 169 LayoutRect boundingBoxForCompositingOverlapTest() const { return overlapBoun
dsIncludeChildren() ? boundingBoxForCompositing() : logicalBoundingBox(); } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 bool shouldPreserve3D() const { return renderer()->style()->transformStyle3D
() == TransformStyle3DPreserve3D; } | 208 bool shouldPreserve3D() const { return renderer()->style()->transformStyle3D
() == TransformStyle3DPreserve3D; } |
| 210 | 209 |
| 211 bool hasFilter() const { return renderer()->hasFilter(); } | 210 bool hasFilter() const { return renderer()->hasFilter(); } |
| 212 | 211 |
| 213 void* operator new(size_t); | 212 void* operator new(size_t); |
| 214 // Only safe to call from RenderLayerModelObject::destroyLayer() | 213 // Only safe to call from RenderLayerModelObject::destroyLayer() |
| 215 void operator delete(void*); | 214 void operator delete(void*); |
| 216 | 215 |
| 217 bool paintsWithTransform() const; | 216 bool paintsWithTransform() const; |
| 218 | 217 |
| 219 bool containsDirtyOverlayScrollbars() const { return m_containsDirtyOverlayS
crollbars; } | |
| 220 void setContainsDirtyOverlayScrollbars(bool dirtyScrollbars) { m_containsDir
tyOverlayScrollbars = dirtyScrollbars; } | |
| 221 | |
| 222 FilterOperations computeFilterOperations(const RenderStyle*); | 218 FilterOperations computeFilterOperations(const RenderStyle*); |
| 223 bool paintsWithFilters() const; | 219 bool paintsWithFilters() const; |
| 224 bool requiresFullLayerImageForFilters() const; | 220 bool requiresFullLayerImageForFilters() const; |
| 225 FilterEffectRenderer* filterRenderer() const | 221 FilterEffectRenderer* filterRenderer() const |
| 226 { | 222 { |
| 227 RenderLayerFilterInfo* filterInfo = this->filterInfo(); | 223 RenderLayerFilterInfo* filterInfo = this->filterInfo(); |
| 228 return filterInfo ? filterInfo->renderer() : 0; | 224 return filterInfo ? filterInfo->renderer() : 0; |
| 229 } | 225 } |
| 230 | 226 |
| 231 RenderLayerFilterInfo* filterInfo() const { return hasFilterInfo() ? RenderL
ayerFilterInfo::filterInfoForRenderLayer(this) : 0; } | 227 RenderLayerFilterInfo* filterInfo() const { return hasFilterInfo() ? RenderL
ayerFilterInfo::filterInfoForRenderLayer(this) : 0; } |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 | 349 |
| 354 void updateSelfPaintingLayer(); | 350 void updateSelfPaintingLayer(); |
| 355 | 351 |
| 356 RenderLayer* enclosingTransformedAncestor() const; | 352 RenderLayer* enclosingTransformedAncestor() const; |
| 357 LayoutPoint computeOffsetFromTransformedAncestor() const; | 353 LayoutPoint computeOffsetFromTransformedAncestor() const; |
| 358 | 354 |
| 359 private: | 355 private: |
| 360 // TODO(ojan): Get rid of this. These are basically layer-tree-only paint ph
ases. | 356 // TODO(ojan): Get rid of this. These are basically layer-tree-only paint ph
ases. |
| 361 enum PaintLayerFlags { | 357 enum PaintLayerFlags { |
| 362 PaintContent, | 358 PaintContent, |
| 363 PaintOverlayScrollbars, | |
| 364 }; | 359 }; |
| 365 | 360 |
| 366 // Bounding box in the coordinates of this layer. | 361 // Bounding box in the coordinates of this layer. |
| 367 LayoutRect logicalBoundingBox() const; | 362 LayoutRect logicalBoundingBox() const; |
| 368 | 363 |
| 369 void setAncestorChainHasSelfPaintingLayerDescendant(); | 364 void setAncestorChainHasSelfPaintingLayerDescendant(); |
| 370 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); | 365 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); |
| 371 | 366 |
| 372 void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&,
BorderRadiusClippingRule = IncludeSelfForBorderRadius); | 367 void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&,
BorderRadiusClippingRule = IncludeSelfForBorderRadius); |
| 373 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&); | 368 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 | 454 |
| 460 unsigned m_usedTransparency : 1; // Tracks whether we need to close a transp
arent layer, i.e., whether | 455 unsigned m_usedTransparency : 1; // Tracks whether we need to close a transp
arent layer, i.e., whether |
| 461 // we ended up painting this layer or any desce
ndants (and therefore need to | 456 // we ended up painting this layer or any desce
ndants (and therefore need to |
| 462 // blend). | 457 // blend). |
| 463 | 458 |
| 464 unsigned m_3DTransformedDescendantStatusDirty : 1; | 459 unsigned m_3DTransformedDescendantStatusDirty : 1; |
| 465 // Set on a stacking context layer that has 3D descendants anywhere | 460 // Set on a stacking context layer that has 3D descendants anywhere |
| 466 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing. | 461 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing. |
| 467 unsigned m_has3DTransformedDescendant : 1; | 462 unsigned m_has3DTransformedDescendant : 1; |
| 468 | 463 |
| 469 unsigned m_containsDirtyOverlayScrollbars : 1; | |
| 470 | |
| 471 unsigned m_hasFilterInfo : 1; | 464 unsigned m_hasFilterInfo : 1; |
| 472 unsigned m_needsAncestorDependentCompositingInputsUpdate : 1; | 465 unsigned m_needsAncestorDependentCompositingInputsUpdate : 1; |
| 473 unsigned m_needsDescendantDependentCompositingInputsUpdate : 1; | 466 unsigned m_needsDescendantDependentCompositingInputsUpdate : 1; |
| 474 unsigned m_childNeedsCompositingInputsUpdate : 1; | 467 unsigned m_childNeedsCompositingInputsUpdate : 1; |
| 475 | 468 |
| 476 // Used only while determining what layers should be composited. Applies to
the tree of z-order lists. | 469 // Used only while determining what layers should be composited. Applies to
the tree of z-order lists. |
| 477 unsigned m_hasCompositingDescendant : 1; | 470 unsigned m_hasCompositingDescendant : 1; |
| 478 | 471 |
| 479 // True if this render layer just lost its grouped mapping due to the Compos
itedLayerMapping being destroyed, | 472 // True if this render layer just lost its grouped mapping due to the Compos
itedLayerMapping being destroyed, |
| 480 // and we don't yet know to what graphics layer this RenderLayer will be ass
igned. | 473 // and we don't yet know to what graphics layer this RenderLayer will be ass
igned. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 505 | 498 |
| 506 } // namespace blink | 499 } // namespace blink |
| 507 | 500 |
| 508 #ifndef NDEBUG | 501 #ifndef NDEBUG |
| 509 // Outside the WebCore namespace for ease of invocation from gdb. | 502 // Outside the WebCore namespace for ease of invocation from gdb. |
| 510 void showLayerTree(const blink::RenderLayer*); | 503 void showLayerTree(const blink::RenderLayer*); |
| 511 void showLayerTree(const blink::RenderObject*); | 504 void showLayerTree(const blink::RenderObject*); |
| 512 #endif | 505 #endif |
| 513 | 506 |
| 514 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ | 507 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ |
| OLD | NEW |