| 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 class AncestorDependentCompositingInputs { | 393 class AncestorDependentCompositingInputs { |
| 394 public: | 394 public: |
| 395 AncestorDependentCompositingInputs() | 395 AncestorDependentCompositingInputs() |
| 396 : opacityAncestor(0) | 396 : opacityAncestor(0) |
| 397 , transformAncestor(0) | 397 , transformAncestor(0) |
| 398 , filterAncestor(0) | 398 , filterAncestor(0) |
| 399 , clippingContainer(0) | 399 , clippingContainer(0) |
| 400 , ancestorScrollingLayer(0) | 400 , ancestorScrollingLayer(0) |
| 401 , scrollParent(0) | 401 , scrollParent(0) |
| 402 , clipParent(0) | 402 , clipParent(0) |
| 403 , isUnclippedDescendant(false) | |
| 404 , hasAncestorWithClipPath(false) | 403 , hasAncestorWithClipPath(false) |
| 405 { } | 404 { } |
| 406 | 405 |
| 407 IntRect clippedAbsoluteBoundingBox; | 406 IntRect clippedAbsoluteBoundingBox; |
| 408 const RenderLayer* opacityAncestor; | 407 const RenderLayer* opacityAncestor; |
| 409 const RenderLayer* transformAncestor; | 408 const RenderLayer* transformAncestor; |
| 410 const RenderLayer* filterAncestor; | 409 const RenderLayer* filterAncestor; |
| 411 const RenderObject* clippingContainer; | 410 const RenderObject* clippingContainer; |
| 412 const RenderLayer* ancestorScrollingLayer; | 411 const RenderLayer* ancestorScrollingLayer; |
| 413 | 412 |
| 414 // A scroll parent is a compositor concept. It's only needed in blink | 413 // A scroll parent is a compositor concept. It's only needed in blink |
| 415 // because we need to use it as a promotion trigger. A layer has a | 414 // because we need to use it as a promotion trigger. A layer has a |
| 416 // scroll parent if neither its compositor scrolling ancestor, nor any | 415 // scroll parent if neither its compositor scrolling ancestor, nor any |
| 417 // other layer scrolled by this ancestor, is a stacking ancestor of this | 416 // other layer scrolled by this ancestor, is a stacking ancestor of this |
| 418 // layer. Layers with scroll parents must be scrolled with the main | 417 // layer. Layers with scroll parents must be scrolled with the main |
| 419 // scrolling layer by the compositor. | 418 // scrolling layer by the compositor. |
| 420 const RenderLayer* scrollParent; | 419 const RenderLayer* scrollParent; |
| 421 | 420 |
| 422 // A clip parent is another compositor concept that has leaked into | 421 // A clip parent is another compositor concept that has leaked into |
| 423 // blink so that it may be used as a promotion trigger. Layers with clip | 422 // blink so that it may be used as a promotion trigger. Layers with clip |
| 424 // parents escape the clip of a stacking tree ancestor. The compositor | 423 // parents escape the clip of a stacking tree ancestor. The compositor |
| 425 // needs to know about clip parents in order to circumvent its normal | 424 // needs to know about clip parents in order to circumvent its normal |
| 426 // clipping logic. | 425 // clipping logic. |
| 427 const RenderLayer* clipParent; | 426 const RenderLayer* clipParent; |
| 428 | 427 |
| 429 // The "is unclipped descendant" concept is now only being used for one | |
| 430 // purpose: when traversing the RenderLayers in stacking order, we check | |
| 431 // if we scroll wrt to these unclipped descendants. We do this to | |
| 432 // proactively promote in the same way that we do for animated layers. | |
| 433 // Since we have no idea where scrolled content will scroll to, we just | |
| 434 // assume that it can overlap the unclipped thing at some point, so we | |
| 435 // promote. But this is unfortunate. We should be able to inflate the | |
| 436 // bounds of scrolling content for overlap the same way we're doing for | |
| 437 // animation and only promote what's necessary. Once we're doing that, | |
| 438 // we won't need to use the "unclipped" concept for promotion any | |
| 439 // longer. | |
| 440 unsigned isUnclippedDescendant : 1; | |
| 441 unsigned hasAncestorWithClipPath : 1; | 428 unsigned hasAncestorWithClipPath : 1; |
| 442 }; | 429 }; |
| 443 | 430 |
| 444 class DescendantDependentCompositingInputs { | 431 class DescendantDependentCompositingInputs { |
| 445 public: | 432 public: |
| 446 DescendantDependentCompositingInputs() | 433 DescendantDependentCompositingInputs() |
| 447 : hasDescendantWithClipPath(false) | 434 : hasDescendantWithClipPath(false) |
| 448 , hasNonIsolatedDescendantWithBlendMode(false) | 435 , hasNonIsolatedDescendantWithBlendMode(false) |
| 449 { } | 436 { } |
| 450 | 437 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 470 const DescendantDependentCompositingInputs& descendantDependentCompositingIn
puts() const { ASSERT(!m_needsDescendantDependentCompositingInputsUpdate); retur
n m_descendantDependentCompositingInputs; } | 457 const DescendantDependentCompositingInputs& descendantDependentCompositingIn
puts() const { ASSERT(!m_needsDescendantDependentCompositingInputsUpdate); retur
n m_descendantDependentCompositingInputs; } |
| 471 | 458 |
| 472 IntRect clippedAbsoluteBoundingBox() const { return ancestorDependentComposi
tingInputs().clippedAbsoluteBoundingBox; } | 459 IntRect clippedAbsoluteBoundingBox() const { return ancestorDependentComposi
tingInputs().clippedAbsoluteBoundingBox; } |
| 473 const RenderLayer* opacityAncestor() const { return ancestorDependentComposi
tingInputs().opacityAncestor; } | 460 const RenderLayer* opacityAncestor() const { return ancestorDependentComposi
tingInputs().opacityAncestor; } |
| 474 const RenderLayer* transformAncestor() const { return ancestorDependentCompo
sitingInputs().transformAncestor; } | 461 const RenderLayer* transformAncestor() const { return ancestorDependentCompo
sitingInputs().transformAncestor; } |
| 475 const RenderLayer* filterAncestor() const { return ancestorDependentComposit
ingInputs().filterAncestor; } | 462 const RenderLayer* filterAncestor() const { return ancestorDependentComposit
ingInputs().filterAncestor; } |
| 476 const RenderObject* clippingContainer() const { return ancestorDependentComp
ositingInputs().clippingContainer; } | 463 const RenderObject* clippingContainer() const { return ancestorDependentComp
ositingInputs().clippingContainer; } |
| 477 const RenderLayer* ancestorScrollingLayer() const { return ancestorDependent
CompositingInputs().ancestorScrollingLayer; } | 464 const RenderLayer* ancestorScrollingLayer() const { return ancestorDependent
CompositingInputs().ancestorScrollingLayer; } |
| 478 RenderLayer* scrollParent() const { return const_cast<RenderLayer*>(ancestor
DependentCompositingInputs().scrollParent); } | 465 RenderLayer* scrollParent() const { return const_cast<RenderLayer*>(ancestor
DependentCompositingInputs().scrollParent); } |
| 479 RenderLayer* clipParent() const { return const_cast<RenderLayer*>(ancestorDe
pendentCompositingInputs().clipParent); } | 466 RenderLayer* clipParent() const { return const_cast<RenderLayer*>(ancestorDe
pendentCompositingInputs().clipParent); } |
| 480 bool isUnclippedDescendant() const { return ancestorDependentCompositingInpu
ts().isUnclippedDescendant; } | |
| 481 bool hasAncestorWithClipPath() const { return ancestorDependentCompositingIn
puts().hasAncestorWithClipPath; } | 467 bool hasAncestorWithClipPath() const { return ancestorDependentCompositingIn
puts().hasAncestorWithClipPath; } |
| 482 bool hasDescendantWithClipPath() const { return descendantDependentCompositi
ngInputs().hasDescendantWithClipPath; } | 468 bool hasDescendantWithClipPath() const { return descendantDependentCompositi
ngInputs().hasDescendantWithClipPath; } |
| 483 bool hasNonIsolatedDescendantWithBlendMode() const { return descendantDepend
entCompositingInputs().hasNonIsolatedDescendantWithBlendMode; } | 469 bool hasNonIsolatedDescendantWithBlendMode() const { return descendantDepend
entCompositingInputs().hasNonIsolatedDescendantWithBlendMode; } |
| 484 | 470 |
| 485 bool lostGroupedMapping() const { ASSERT(isAllowedToQueryCompositingState())
; return m_lostGroupedMapping; } | 471 bool lostGroupedMapping() const { ASSERT(isAllowedToQueryCompositingState())
; return m_lostGroupedMapping; } |
| 486 void setLostGroupedMapping(bool b) { m_lostGroupedMapping = b; } | 472 void setLostGroupedMapping(bool b) { m_lostGroupedMapping = b; } |
| 487 | 473 |
| 488 CompositingReasons compositingReasons() const { ASSERT(isAllowedToQueryCompo
sitingState()); return m_compositingReasons; } | 474 CompositingReasons compositingReasons() const { ASSERT(isAllowedToQueryCompo
sitingState()); return m_compositingReasons; } |
| 489 void setCompositingReasons(CompositingReasons, CompositingReasons mask = Com
positingReasonAll); | 475 void setCompositingReasons(CompositingReasons, CompositingReasons mask = Com
positingReasonAll); |
| 490 | 476 |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 | 694 |
| 709 } // namespace blink | 695 } // namespace blink |
| 710 | 696 |
| 711 #ifndef NDEBUG | 697 #ifndef NDEBUG |
| 712 // Outside the WebCore namespace for ease of invocation from gdb. | 698 // Outside the WebCore namespace for ease of invocation from gdb. |
| 713 void showLayerTree(const blink::RenderLayer*); | 699 void showLayerTree(const blink::RenderLayer*); |
| 714 void showLayerTree(const blink::RenderObject*); | 700 void showLayerTree(const blink::RenderObject*); |
| 715 #endif | 701 #endif |
| 716 | 702 |
| 717 #endif // RenderLayer_h | 703 #endif // RenderLayer_h |
| OLD | NEW |