| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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" | 51 #include "sky/engine/core/rendering/RenderLayerFilterInfo.h" |
| 52 #include "sky/engine/core/rendering/RenderLayerRepainter.h" | 52 #include "sky/engine/core/rendering/RenderLayerRepainter.h" |
| 53 #include "sky/engine/core/rendering/RenderLayerScrollableArea.h" | 53 #include "sky/engine/core/rendering/RenderLayerScrollableArea.h" |
| 54 #include "sky/engine/core/rendering/RenderLayerStackingNode.h" | 54 #include "sky/engine/core/rendering/RenderLayerStackingNode.h" |
| 55 #include "sky/engine/core/rendering/RenderLayerStackingNodeIterator.h" | 55 #include "sky/engine/core/rendering/RenderLayerStackingNodeIterator.h" |
| 56 #include "sky/engine/platform/graphics/CompositingReasons.h" | |
| 57 #include "sky/engine/public/platform/WebBlendMode.h" | 56 #include "sky/engine/public/platform/WebBlendMode.h" |
| 58 #include "sky/engine/wtf/OwnPtr.h" | 57 #include "sky/engine/wtf/OwnPtr.h" |
| 59 | 58 |
| 60 namespace blink { | 59 namespace blink { |
| 61 | 60 |
| 62 class FilterEffectRenderer; | 61 class FilterEffectRenderer; |
| 63 class FilterOperations; | 62 class FilterOperations; |
| 64 class HitTestRequest; | 63 class HitTestRequest; |
| 65 class HitTestResult; | 64 class HitTestResult; |
| 66 class HitTestingTransformState; | 65 class HitTestingTransformState; |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 | 283 |
| 285 inline bool isPositionedContainer() const | 284 inline bool isPositionedContainer() const |
| 286 { | 285 { |
| 287 // FIXME: This is not in sync with containingBlock. | 286 // FIXME: This is not in sync with containingBlock. |
| 288 RenderLayerModelObject* layerRenderer = renderer(); | 287 RenderLayerModelObject* layerRenderer = renderer(); |
| 289 return isRootLayer() || layerRenderer->isPositioned() || hasTransform(); | 288 return isRootLayer() || layerRenderer->isPositioned() || hasTransform(); |
| 290 } | 289 } |
| 291 | 290 |
| 292 bool scrollsOverflow() const; | 291 bool scrollsOverflow() const; |
| 293 | 292 |
| 294 CompositingReasons potentialCompositingReasonsFromStyle() const { return m_p
otentialCompositingReasonsFromStyle; } | |
| 295 void setPotentialCompositingReasonsFromStyle(CompositingReasons reasons) { A
SSERT(reasons == (reasons & CompositingReasonComboAllStyleDeterminedReasons)); m
_potentialCompositingReasonsFromStyle = reasons; } | |
| 296 | |
| 297 bool hasStyleDeterminedDirectCompositingReasons() const { return m_potential
CompositingReasonsFromStyle & CompositingReasonComboAllDirectStyleDeterminedReas
ons; } | |
| 298 | |
| 299 class AncestorDependentCompositingInputs { | 293 class AncestorDependentCompositingInputs { |
| 300 public: | 294 public: |
| 301 AncestorDependentCompositingInputs() | 295 AncestorDependentCompositingInputs() |
| 302 : opacityAncestor(0) | 296 : opacityAncestor(0) |
| 303 , transformAncestor(0) | 297 , transformAncestor(0) |
| 304 , filterAncestor(0) | 298 , filterAncestor(0) |
| 305 , clippingContainer(0) | 299 , clippingContainer(0) |
| 306 , ancestorScrollingLayer(0) | 300 , ancestorScrollingLayer(0) |
| 307 , scrollParent(0) | 301 , scrollParent(0) |
| 308 , clipParent(0) | 302 , clipParent(0) |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 const RenderLayer* ancestorScrollingLayer() const { return ancestorDependent
CompositingInputs().ancestorScrollingLayer; } | 374 const RenderLayer* ancestorScrollingLayer() const { return ancestorDependent
CompositingInputs().ancestorScrollingLayer; } |
| 381 RenderLayer* scrollParent() const { return const_cast<RenderLayer*>(ancestor
DependentCompositingInputs().scrollParent); } | 375 RenderLayer* scrollParent() const { return const_cast<RenderLayer*>(ancestor
DependentCompositingInputs().scrollParent); } |
| 382 RenderLayer* clipParent() const { return const_cast<RenderLayer*>(ancestorDe
pendentCompositingInputs().clipParent); } | 376 RenderLayer* clipParent() const { return const_cast<RenderLayer*>(ancestorDe
pendentCompositingInputs().clipParent); } |
| 383 bool isUnclippedDescendant() const { return ancestorDependentCompositingInpu
ts().isUnclippedDescendant; } | 377 bool isUnclippedDescendant() const { return ancestorDependentCompositingInpu
ts().isUnclippedDescendant; } |
| 384 bool hasAncestorWithClipPath() const { return ancestorDependentCompositingIn
puts().hasAncestorWithClipPath; } | 378 bool hasAncestorWithClipPath() const { return ancestorDependentCompositingIn
puts().hasAncestorWithClipPath; } |
| 385 bool hasDescendantWithClipPath() const { return descendantDependentCompositi
ngInputs().hasDescendantWithClipPath; } | 379 bool hasDescendantWithClipPath() const { return descendantDependentCompositi
ngInputs().hasDescendantWithClipPath; } |
| 386 | 380 |
| 387 bool lostGroupedMapping() const { return m_lostGroupedMapping; } | 381 bool lostGroupedMapping() const { return m_lostGroupedMapping; } |
| 388 void setLostGroupedMapping(bool b) { m_lostGroupedMapping = b; } | 382 void setLostGroupedMapping(bool b) { m_lostGroupedMapping = b; } |
| 389 | 383 |
| 390 CompositingReasons compositingReasons() const { return m_compositingReasons;
} | |
| 391 void setCompositingReasons(CompositingReasons, CompositingReasons mask = Com
positingReasonAll); | |
| 392 | |
| 393 bool hasCompositingDescendant() const { return m_hasCompositingDescendant; } | 384 bool hasCompositingDescendant() const { return m_hasCompositingDescendant; } |
| 394 void setHasCompositingDescendant(bool); | 385 void setHasCompositingDescendant(bool); |
| 395 | 386 |
| 396 void updateOrRemoveFilterEffectRenderer(); | 387 void updateOrRemoveFilterEffectRenderer(); |
| 397 | 388 |
| 398 void updateSelfPaintingLayer(); | 389 void updateSelfPaintingLayer(); |
| 399 | 390 |
| 400 RenderLayer* enclosingTransformedAncestor() const; | 391 RenderLayer* enclosingTransformedAncestor() const; |
| 401 LayoutPoint computeOffsetFromTransformedAncestor() const; | 392 LayoutPoint computeOffsetFromTransformedAncestor() const; |
| 402 | 393 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 RenderLayer* m_next; | 540 RenderLayer* m_next; |
| 550 RenderLayer* m_first; | 541 RenderLayer* m_first; |
| 551 RenderLayer* m_last; | 542 RenderLayer* m_last; |
| 552 | 543 |
| 553 // Cached normal flow values for absolute positioned elements with static le
ft/top values. | 544 // Cached normal flow values for absolute positioned elements with static le
ft/top values. |
| 554 LayoutUnit m_staticInlinePosition; | 545 LayoutUnit m_staticInlinePosition; |
| 555 LayoutUnit m_staticBlockPosition; | 546 LayoutUnit m_staticBlockPosition; |
| 556 | 547 |
| 557 OwnPtr<TransformationMatrix> m_transform; | 548 OwnPtr<TransformationMatrix> m_transform; |
| 558 | 549 |
| 559 // These compositing reasons are updated whenever style changes, not while u
pdating compositing layers. | |
| 560 // They should not be used to infer the compositing state of this layer. | |
| 561 CompositingReasons m_potentialCompositingReasonsFromStyle; | |
| 562 | |
| 563 // Once computed, indicates all that a layer needs to become composited usin
g the CompositingReasons enum bitfield. | |
| 564 CompositingReasons m_compositingReasons; | |
| 565 | |
| 566 DescendantDependentCompositingInputs m_descendantDependentCompositingInputs; | 550 DescendantDependentCompositingInputs m_descendantDependentCompositingInputs; |
| 567 AncestorDependentCompositingInputs m_ancestorDependentCompositingInputs; | 551 AncestorDependentCompositingInputs m_ancestorDependentCompositingInputs; |
| 568 | 552 |
| 569 IntRect m_blockSelectionGapsBounds; | 553 IntRect m_blockSelectionGapsBounds; |
| 570 | 554 |
| 571 OwnPtr<RenderLayerScrollableArea> m_scrollableArea; | 555 OwnPtr<RenderLayerScrollableArea> m_scrollableArea; |
| 572 | 556 |
| 573 RenderLayerRepainter m_paintInvalidator; | 557 RenderLayerRepainter m_paintInvalidator; |
| 574 RenderLayerClipper m_clipper; // FIXME: Lazily allocate? | 558 RenderLayerClipper m_clipper; // FIXME: Lazily allocate? |
| 575 OwnPtr<RenderLayerStackingNode> m_stackingNode; | 559 OwnPtr<RenderLayerStackingNode> m_stackingNode; |
| 576 | 560 |
| 577 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of a c
omposited layer's composited bounds compared to absolute coordinates. | 561 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of a c
omposited layer's composited bounds compared to absolute coordinates. |
| 578 }; | 562 }; |
| 579 | 563 |
| 580 } // namespace blink | 564 } // namespace blink |
| 581 | 565 |
| 582 #ifndef NDEBUG | 566 #ifndef NDEBUG |
| 583 // Outside the WebCore namespace for ease of invocation from gdb. | 567 // Outside the WebCore namespace for ease of invocation from gdb. |
| 584 void showLayerTree(const blink::RenderLayer*); | 568 void showLayerTree(const blink::RenderLayer*); |
| 585 void showLayerTree(const blink::RenderObject*); | 569 void showLayerTree(const blink::RenderObject*); |
| 586 #endif | 570 #endif |
| 587 | 571 |
| 588 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ | 572 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ |
| OLD | NEW |