| 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 RenderLayer* scrollParent() const | 334 RenderLayer* scrollParent() const |
| 335 { | 335 { |
| 336 return const_cast<RenderLayer*>(compositingInputs().scrollParent); | 336 return const_cast<RenderLayer*>(compositingInputs().scrollParent); |
| 337 } | 337 } |
| 338 | 338 |
| 339 // Computes the position of the given render object in the space of |paintIn
validationContainer|. | 339 // Computes the position of the given render object in the space of |paintIn
validationContainer|. |
| 340 // FIXME: invert the logic to have paint invalidation containers take care o
f painting objects into them, rather than the reverse. | 340 // FIXME: invert the logic to have paint invalidation containers take care o
f painting objects into them, rather than the reverse. |
| 341 // This will allow us to clean up this static method messiness. | 341 // This will allow us to clean up this static method messiness. |
| 342 static LayoutPoint positionFromPaintInvalidationContainer(const RenderObject
*, const RenderLayerModelObject* paintInvalidationContainer); | 342 static LayoutPoint positionFromPaintInvalidationContainer(const RenderObject
*, const RenderLayerModelObject* paintInvalidationContainer); |
| 343 | 343 |
| 344 static void mapRectToPaintBackingCoordinates(const RenderLayerModelObject* p
aintInvalidationContainer, LayoutRect&); |
| 345 |
| 344 // Adjusts the given rect (in the coordinate space of the RenderObject) to t
he coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing. | 346 // Adjusts the given rect (in the coordinate space of the RenderObject) to t
he coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing. |
| 345 static void mapRectToPaintInvalidationBacking(const RenderObject*, const Ren
derLayerModelObject* paintInvalidationContainer, LayoutRect&); | 347 static void mapRectToPaintInvalidationBacking(const RenderObject*, const Ren
derLayerModelObject* paintInvalidationContainer, LayoutRect&); |
| 346 | 348 |
| 347 // Computes the bounding paint invalidation rect for |renderObject|, in the
coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing. | 349 // Computes the bounding paint invalidation rect for |renderObject|, in the
coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing. |
| 348 static LayoutRect computePaintInvalidationRect(const RenderObject*, const Re
nderLayer* paintInvalidationContainer); | 350 static LayoutRect computePaintInvalidationRect(const RenderObject*, const Re
nderLayer* paintInvalidationContainer); |
| 349 | 351 |
| 350 bool paintsWithTransparency(PaintBehavior paintBehavior) const | 352 bool paintsWithTransparency(PaintBehavior paintBehavior) const |
| 351 { | 353 { |
| 352 return isTransparent() && ((paintBehavior & PaintBehaviorFlattenComposit
ingLayers) || compositingState() != PaintsIntoOwnBacking); | 354 return isTransparent() && ((paintBehavior & PaintBehaviorFlattenComposit
ingLayers) || compositingState() != PaintsIntoOwnBacking); |
| 353 } | 355 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 // instead. | 427 // instead. |
| 426 RenderLayerModelObject* layerRenderer = renderer(); | 428 RenderLayerModelObject* layerRenderer = renderer(); |
| 427 return isRootLayer() || layerRenderer->isPositioned() || hasTransform(); | 429 return isRootLayer() || layerRenderer->isPositioned() || hasTransform(); |
| 428 } | 430 } |
| 429 | 431 |
| 430 // paintLayer() assumes that the caller will clip to the bounds of the paint
ing dirty if necessary. | 432 // paintLayer() assumes that the caller will clip to the bounds of the paint
ing dirty if necessary. |
| 431 void paintLayer(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags)
; | 433 void paintLayer(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags)
; |
| 432 | 434 |
| 433 RenderLayerBlendInfo& blendInfo() { return m_blendInfo; } | 435 RenderLayerBlendInfo& blendInfo() { return m_blendInfo; } |
| 434 | 436 |
| 435 void setOffsetFromSquashingLayerOrigin(IntSize offset) { m_offsetFromSquashi
ngLayerOrigin = offset; } | |
| 436 IntSize offsetFromSquashingLayerOrigin() const { ASSERT(isAllowedToQueryComp
ositingState()); return m_offsetFromSquashingLayerOrigin; } | |
| 437 | |
| 438 bool scrollsOverflow() const; | 437 bool scrollsOverflow() const; |
| 439 | 438 |
| 440 CompositingReasons potentialCompositingReasonsFromStyle() const { return m_p
otentialCompositingReasonsFromStyle; } | 439 CompositingReasons potentialCompositingReasonsFromStyle() const { return m_p
otentialCompositingReasonsFromStyle; } |
| 441 void setPotentialCompositingReasonsFromStyle(CompositingReasons reasons) { A
SSERT(reasons == (reasons & CompositingReasonComboAllStyleDeterminedReasons)); m
_potentialCompositingReasonsFromStyle = reasons; } | 440 void setPotentialCompositingReasonsFromStyle(CompositingReasons reasons) { A
SSERT(reasons == (reasons & CompositingReasonComboAllStyleDeterminedReasons)); m
_potentialCompositingReasonsFromStyle = reasons; } |
| 442 | 441 |
| 443 bool hasStyleDeterminedDirectCompositingReasons() const { return m_potential
CompositingReasonsFromStyle & CompositingReasonComboAllDirectStyleDeterminedReas
ons; } | 442 bool hasStyleDeterminedDirectCompositingReasons() const { return m_potential
CompositingReasonsFromStyle & CompositingReasonComboAllDirectStyleDeterminedReas
ons; } |
| 444 | 443 |
| 445 class CompositingInputs { | 444 class CompositingInputs { |
| 446 public: | 445 public: |
| 447 CompositingInputs() | 446 CompositingInputs() |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 // Pointer to the enclosing RenderLayer that caused us to be paginated. It i
s 0 if we are not paginated. | 700 // Pointer to the enclosing RenderLayer that caused us to be paginated. It i
s 0 if we are not paginated. |
| 702 RenderLayer* m_enclosingPaginationLayer; | 701 RenderLayer* m_enclosingPaginationLayer; |
| 703 | 702 |
| 704 // These compositing reasons are updated whenever style changes, not while u
pdating compositing layers. | 703 // These compositing reasons are updated whenever style changes, not while u
pdating compositing layers. |
| 705 // They should not be used to infer the compositing state of this layer. | 704 // They should not be used to infer the compositing state of this layer. |
| 706 CompositingReasons m_potentialCompositingReasonsFromStyle; | 705 CompositingReasons m_potentialCompositingReasonsFromStyle; |
| 707 | 706 |
| 708 // Once computed, indicates all that a layer needs to become composited usin
g the CompositingReasons enum bitfield. | 707 // Once computed, indicates all that a layer needs to become composited usin
g the CompositingReasons enum bitfield. |
| 709 CompositingReasons m_compositingReasons; | 708 CompositingReasons m_compositingReasons; |
| 710 | 709 |
| 711 // Used for invalidating this layer's contents on the squashing GraphicsLaye
r. | |
| 712 IntSize m_offsetFromSquashingLayerOrigin; | |
| 713 | |
| 714 CompositingInputs m_compositingInputs; | 710 CompositingInputs m_compositingInputs; |
| 715 | 711 |
| 716 IntRect m_blockSelectionGapsBounds; | 712 IntRect m_blockSelectionGapsBounds; |
| 717 | 713 |
| 718 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping; | 714 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping; |
| 719 OwnPtr<RenderLayerScrollableArea> m_scrollableArea; | 715 OwnPtr<RenderLayerScrollableArea> m_scrollableArea; |
| 720 | 716 |
| 721 CompositedLayerMapping* m_groupedMapping; | 717 CompositedLayerMapping* m_groupedMapping; |
| 722 | 718 |
| 723 RenderLayerRepainter m_repainter; | 719 RenderLayerRepainter m_repainter; |
| 724 RenderLayerClipper m_clipper; // FIXME: Lazily allocate? | 720 RenderLayerClipper m_clipper; // FIXME: Lazily allocate? |
| 725 OwnPtr<RenderLayerStackingNode> m_stackingNode; | 721 OwnPtr<RenderLayerStackingNode> m_stackingNode; |
| 726 OwnPtr<RenderLayerReflectionInfo> m_reflectionInfo; | 722 OwnPtr<RenderLayerReflectionInfo> m_reflectionInfo; |
| 727 RenderLayerBlendInfo m_blendInfo; | 723 RenderLayerBlendInfo m_blendInfo; |
| 728 | 724 |
| 729 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of a c
omposited layer's composited bounds compared to absolute coordinates. | 725 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of a c
omposited layer's composited bounds compared to absolute coordinates. |
| 730 }; | 726 }; |
| 731 | 727 |
| 732 } // namespace WebCore | 728 } // namespace WebCore |
| 733 | 729 |
| 734 #ifndef NDEBUG | 730 #ifndef NDEBUG |
| 735 // Outside the WebCore namespace for ease of invocation from gdb. | 731 // Outside the WebCore namespace for ease of invocation from gdb. |
| 736 void showLayerTree(const WebCore::RenderLayer*); | 732 void showLayerTree(const WebCore::RenderLayer*); |
| 737 void showLayerTree(const WebCore::RenderObject*); | 733 void showLayerTree(const WebCore::RenderObject*); |
| 738 #endif | 734 #endif |
| 739 | 735 |
| 740 #endif // RenderLayer_h | 736 #endif // RenderLayer_h |
| OLD | NEW |