Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(864)

Side by Side Diff: sky/engine/core/rendering/RenderLayer.h

Issue 731863003: Remove CSSCompositing (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: preland Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 FloatPoint perspectiveOrigin() const; 253 FloatPoint perspectiveOrigin() const;
254 bool preserves3D() const { return renderer()->style()->transformStyle3D() == TransformStyle3DPreserve3D; } 254 bool preserves3D() const { return renderer()->style()->transformStyle3D() == TransformStyle3DPreserve3D; }
255 bool has3DTransform() const { return m_transform && !m_transform->isAffine() ; } 255 bool has3DTransform() const { return m_transform && !m_transform->isAffine() ; }
256 256
257 // FIXME: reflections should force transform-style to be flat in the style: https://bugs.webkit.org/show_bug.cgi?id=106959 257 // FIXME: reflections should force transform-style to be flat in the style: https://bugs.webkit.org/show_bug.cgi?id=106959
258 bool shouldPreserve3D() const { return renderer()->style()->transformStyle3D () == TransformStyle3DPreserve3D; } 258 bool shouldPreserve3D() const { return renderer()->style()->transformStyle3D () == TransformStyle3DPreserve3D; }
259 259
260 void filterNeedsPaintInvalidation(); 260 void filterNeedsPaintInvalidation();
261 bool hasFilter() const { return renderer()->hasFilter(); } 261 bool hasFilter() const { return renderer()->hasFilter(); }
262 262
263 bool paintsWithBlendMode() const;
264
265 void* operator new(size_t); 263 void* operator new(size_t);
266 // Only safe to call from RenderLayerModelObject::destroyLayer() 264 // Only safe to call from RenderLayerModelObject::destroyLayer()
267 void operator delete(void*); 265 void operator delete(void*);
268 266
269 CompositingState compositingState() const; 267 CompositingState compositingState() const;
270 268
271 // This returns true if our document is in a phase of its lifestyle during w hich 269 // This returns true if our document is in a phase of its lifestyle during w hich
272 // compositing state may legally be read. 270 // compositing state may legally be read.
273 bool isAllowedToQueryCompositingState() const; 271 bool isAllowedToQueryCompositingState() const;
274 272
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 // we won't need to use the "unclipped" concept for promotion any 415 // we won't need to use the "unclipped" concept for promotion any
418 // longer. 416 // longer.
419 unsigned isUnclippedDescendant : 1; 417 unsigned isUnclippedDescendant : 1;
420 unsigned hasAncestorWithClipPath : 1; 418 unsigned hasAncestorWithClipPath : 1;
421 }; 419 };
422 420
423 class DescendantDependentCompositingInputs { 421 class DescendantDependentCompositingInputs {
424 public: 422 public:
425 DescendantDependentCompositingInputs() 423 DescendantDependentCompositingInputs()
426 : hasDescendantWithClipPath(false) 424 : hasDescendantWithClipPath(false)
427 , hasDescendantWithBlendMode(false) 425
428 { } 426 { }
429 427
430 unsigned hasDescendantWithClipPath : 1; 428 unsigned hasDescendantWithClipPath : 1;
431 unsigned hasDescendantWithBlendMode : 1;
432 }; 429 };
433 430
434 void setNeedsCompositingInputsUpdate(); 431 void setNeedsCompositingInputsUpdate();
435 bool childNeedsCompositingInputsUpdate() const { return m_childNeedsComposit ingInputsUpdate; } 432 bool childNeedsCompositingInputsUpdate() const { return m_childNeedsComposit ingInputsUpdate; }
436 bool needsCompositingInputsUpdate() const 433 bool needsCompositingInputsUpdate() const
437 { 434 {
438 // While we're updating the compositing inputs, these values may differ. 435 // While we're updating the compositing inputs, these values may differ.
439 // We should never be asking for this value when that is the case. 436 // We should never be asking for this value when that is the case.
440 ASSERT(m_needsDescendantDependentCompositingInputsUpdate == m_needsAnces torDependentCompositingInputsUpdate); 437 ASSERT(m_needsDescendantDependentCompositingInputsUpdate == m_needsAnces torDependentCompositingInputsUpdate);
441 return m_needsDescendantDependentCompositingInputsUpdate; 438 return m_needsDescendantDependentCompositingInputsUpdate;
(...skipping 10 matching lines...) Expand all
452 const RenderLayer* opacityAncestor() const { return ancestorDependentComposi tingInputs().opacityAncestor; } 449 const RenderLayer* opacityAncestor() const { return ancestorDependentComposi tingInputs().opacityAncestor; }
453 const RenderLayer* transformAncestor() const { return ancestorDependentCompo sitingInputs().transformAncestor; } 450 const RenderLayer* transformAncestor() const { return ancestorDependentCompo sitingInputs().transformAncestor; }
454 const RenderLayer* filterAncestor() const { return ancestorDependentComposit ingInputs().filterAncestor; } 451 const RenderLayer* filterAncestor() const { return ancestorDependentComposit ingInputs().filterAncestor; }
455 const RenderObject* clippingContainer() const { return ancestorDependentComp ositingInputs().clippingContainer; } 452 const RenderObject* clippingContainer() const { return ancestorDependentComp ositingInputs().clippingContainer; }
456 const RenderLayer* ancestorScrollingLayer() const { return ancestorDependent CompositingInputs().ancestorScrollingLayer; } 453 const RenderLayer* ancestorScrollingLayer() const { return ancestorDependent CompositingInputs().ancestorScrollingLayer; }
457 RenderLayer* scrollParent() const { return const_cast<RenderLayer*>(ancestor DependentCompositingInputs().scrollParent); } 454 RenderLayer* scrollParent() const { return const_cast<RenderLayer*>(ancestor DependentCompositingInputs().scrollParent); }
458 RenderLayer* clipParent() const { return const_cast<RenderLayer*>(ancestorDe pendentCompositingInputs().clipParent); } 455 RenderLayer* clipParent() const { return const_cast<RenderLayer*>(ancestorDe pendentCompositingInputs().clipParent); }
459 bool isUnclippedDescendant() const { return ancestorDependentCompositingInpu ts().isUnclippedDescendant; } 456 bool isUnclippedDescendant() const { return ancestorDependentCompositingInpu ts().isUnclippedDescendant; }
460 bool hasAncestorWithClipPath() const { return ancestorDependentCompositingIn puts().hasAncestorWithClipPath; } 457 bool hasAncestorWithClipPath() const { return ancestorDependentCompositingIn puts().hasAncestorWithClipPath; }
461 bool hasDescendantWithClipPath() const { return descendantDependentCompositi ngInputs().hasDescendantWithClipPath; } 458 bool hasDescendantWithClipPath() const { return descendantDependentCompositi ngInputs().hasDescendantWithClipPath; }
462 bool hasDescendantWithBlendMode() const { return descendantDependentComposit ingInputs().hasDescendantWithBlendMode; }
463 459
464 bool lostGroupedMapping() const { ASSERT(isAllowedToQueryCompositingState()) ; return m_lostGroupedMapping; } 460 bool lostGroupedMapping() const { ASSERT(isAllowedToQueryCompositingState()) ; return m_lostGroupedMapping; }
465 void setLostGroupedMapping(bool b) { m_lostGroupedMapping = b; } 461 void setLostGroupedMapping(bool b) { m_lostGroupedMapping = b; }
466 462
467 CompositingReasons compositingReasons() const { ASSERT(isAllowedToQueryCompo sitingState()); return m_compositingReasons; } 463 CompositingReasons compositingReasons() const { ASSERT(isAllowedToQueryCompo sitingState()); return m_compositingReasons; }
468 void setCompositingReasons(CompositingReasons, CompositingReasons mask = Com positingReasonAll); 464 void setCompositingReasons(CompositingReasons, CompositingReasons mask = Com positingReasonAll);
469 465
470 bool hasCompositingDescendant() const { ASSERT(isAllowedToQueryCompositingSt ate()); return m_hasCompositingDescendant; } 466 bool hasCompositingDescendant() const { ASSERT(isAllowedToQueryCompositingSt ate()); return m_hasCompositingDescendant; }
471 void setHasCompositingDescendant(bool); 467 void setHasCompositingDescendant(bool);
472 468
473 bool shouldIsolateCompositedDescendants() const { ASSERT(isAllowedToQueryCom positingState()); return m_shouldIsolateCompositedDescendants; }
474 void setShouldIsolateCompositedDescendants(bool);
475
476 void updateOrRemoveFilterEffectRenderer(); 469 void updateOrRemoveFilterEffectRenderer();
477 470
478 void updateSelfPaintingLayer(); 471 void updateSelfPaintingLayer();
479 472
480 // paintLayerContents() assumes that the caller will clip to the bounds of t he painting dirty rect if necessary. 473 // paintLayerContents() assumes that the caller will clip to the bounds of t he painting dirty rect if necessary.
481 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay erFlags); 474 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay erFlags);
482 475
483 RenderLayer* enclosingTransformedAncestor() const; 476 RenderLayer* enclosingTransformedAncestor() const;
484 LayoutPoint computeOffsetFromTransformedAncestor() const; 477 LayoutPoint computeOffsetFromTransformedAncestor() const;
485 478
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 unsigned m_containsDirtyOverlayScrollbars : 1; 602 unsigned m_containsDirtyOverlayScrollbars : 1;
610 603
611 unsigned m_hasFilterInfo : 1; 604 unsigned m_hasFilterInfo : 1;
612 unsigned m_needsAncestorDependentCompositingInputsUpdate : 1; 605 unsigned m_needsAncestorDependentCompositingInputsUpdate : 1;
613 unsigned m_needsDescendantDependentCompositingInputsUpdate : 1; 606 unsigned m_needsDescendantDependentCompositingInputsUpdate : 1;
614 unsigned m_childNeedsCompositingInputsUpdate : 1; 607 unsigned m_childNeedsCompositingInputsUpdate : 1;
615 608
616 // Used only while determining what layers should be composited. Applies to the tree of z-order lists. 609 // Used only while determining what layers should be composited. Applies to the tree of z-order lists.
617 unsigned m_hasCompositingDescendant : 1; 610 unsigned m_hasCompositingDescendant : 1;
618 611
619 // Should be for stacking contexts having unisolated blending descendants.
620 unsigned m_shouldIsolateCompositedDescendants : 1;
621
622 // True if this render layer just lost its grouped mapping due to the Compos itedLayerMapping being destroyed, 612 // True if this render layer just lost its grouped mapping due to the Compos itedLayerMapping being destroyed,
623 // and we don't yet know to what graphics layer this RenderLayer will be ass igned. 613 // and we don't yet know to what graphics layer this RenderLayer will be ass igned.
624 unsigned m_lostGroupedMapping : 1; 614 unsigned m_lostGroupedMapping : 1;
625 615
626 RenderLayerModelObject* m_renderer; 616 RenderLayerModelObject* m_renderer;
627 617
628 RenderLayer* m_parent; 618 RenderLayer* m_parent;
629 RenderLayer* m_previous; 619 RenderLayer* m_previous;
630 RenderLayer* m_next; 620 RenderLayer* m_next;
631 RenderLayer* m_first; 621 RenderLayer* m_first;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 653
664 } // namespace blink 654 } // namespace blink
665 655
666 #ifndef NDEBUG 656 #ifndef NDEBUG
667 // Outside the WebCore namespace for ease of invocation from gdb. 657 // Outside the WebCore namespace for ease of invocation from gdb.
668 void showLayerTree(const blink::RenderLayer*); 658 void showLayerTree(const blink::RenderLayer*);
669 void showLayerTree(const blink::RenderObject*); 659 void showLayerTree(const blink::RenderObject*);
670 #endif 660 #endif
671 661
672 #endif // RenderLayer_h 662 #endif // RenderLayer_h
OLDNEW
« no previous file with comments | « sky/engine/core/html/canvas/CanvasRenderingContext2D.idl ('k') | sky/engine/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698