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

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

Issue 778883002: Remove all but one of the PaintLayerFlags. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // FIXME: invert the logic to have paint invalidation containers take care o f painting objects into them, rather than the reverse. 249 // FIXME: invert the logic to have paint invalidation containers take care o f painting objects into them, rather than the reverse.
250 // This will allow us to clean up this static method messiness. 250 // This will allow us to clean up this static method messiness.
251 static LayoutPoint positionFromPaintInvalidationContainer(const RenderObject *, const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalida tionState* = 0); 251 static LayoutPoint positionFromPaintInvalidationContainer(const RenderObject *, const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalida tionState* = 0);
252 252
253 // Adjusts the given rect (in the coordinate space of the RenderObject) to t he coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing. 253 // Adjusts the given rect (in the coordinate space of the RenderObject) to t he coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing.
254 static void mapRectToPaintInvalidationBacking(const RenderObject*, const Ren derLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalid ationState* = 0); 254 static void mapRectToPaintInvalidationBacking(const RenderObject*, const Ren derLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalid ationState* = 0);
255 255
256 // Computes the bounding paint invalidation rect for |renderObject|, in the coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing. 256 // Computes the bounding paint invalidation rect for |renderObject|, in the coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing.
257 static LayoutRect computePaintInvalidationRect(const RenderObject*, const Re nderLayer* paintInvalidationContainer, const PaintInvalidationState* = 0); 257 static LayoutRect computePaintInvalidationRect(const RenderObject*, const Re nderLayer* paintInvalidationContainer, const PaintInvalidationState* = 0);
258 258
259 bool paintsWithTransparency(PaintBehavior paintBehavior) const
260 {
261 // FIXME(sky): Remove
262 return isTransparent();
263 }
264
265 bool paintsWithTransform(PaintBehavior) const; 259 bool paintsWithTransform(PaintBehavior) const;
266 260
267 // Returns true if background phase is painted opaque in the given rect. 261 // Returns true if background phase is painted opaque in the given rect.
268 // The query rect is given in local coordinates. 262 // The query rect is given in local coordinates.
269 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const; 263 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const;
270 264
271 bool containsDirtyOverlayScrollbars() const { return m_containsDirtyOverlayS crollbars; } 265 bool containsDirtyOverlayScrollbars() const { return m_containsDirtyOverlayS crollbars; }
272 void setContainsDirtyOverlayScrollbars(bool dirtyScrollbars) { m_containsDir tyOverlayScrollbars = dirtyScrollbars; } 266 void setContainsDirtyOverlayScrollbars(bool dirtyScrollbars) { m_containsDir tyOverlayScrollbars = dirtyScrollbars; }
273 267
274 FilterOperations computeFilterOperations(const RenderStyle*); 268 FilterOperations computeFilterOperations(const RenderStyle*);
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 CompositingReasons compositingReasons() const { return m_compositingReasons; } 408 CompositingReasons compositingReasons() const { return m_compositingReasons; }
415 void setCompositingReasons(CompositingReasons, CompositingReasons mask = Com positingReasonAll); 409 void setCompositingReasons(CompositingReasons, CompositingReasons mask = Com positingReasonAll);
416 410
417 bool hasCompositingDescendant() const { return m_hasCompositingDescendant; } 411 bool hasCompositingDescendant() const { return m_hasCompositingDescendant; }
418 void setHasCompositingDescendant(bool); 412 void setHasCompositingDescendant(bool);
419 413
420 void updateOrRemoveFilterEffectRenderer(); 414 void updateOrRemoveFilterEffectRenderer();
421 415
422 void updateSelfPaintingLayer(); 416 void updateSelfPaintingLayer();
423 417
424 // paintLayerContents() assumes that the caller will clip to the bounds of t he painting dirty rect if necessary.
425 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay erFlags);
426
427 RenderLayer* enclosingTransformedAncestor() const; 418 RenderLayer* enclosingTransformedAncestor() const;
428 LayoutPoint computeOffsetFromTransformedAncestor() const; 419 LayoutPoint computeOffsetFromTransformedAncestor() const;
429 420
430 void didUpdateNeedsCompositedScrolling(); 421 void didUpdateNeedsCompositedScrolling();
431 422
432 void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); 423 void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants();
433 424
434 private: 425 private:
435 // Bounding box in the coordinates of this layer. 426 // Bounding box in the coordinates of this layer.
436 LayoutRect logicalBoundingBox() const; 427 LayoutRect logicalBoundingBox() const;
(...skipping 16 matching lines...) Expand all
453 bool hasSelfPaintingLayerDescendant() const 444 bool hasSelfPaintingLayerDescendant() const
454 { 445 {
455 if (m_hasSelfPaintingLayerDescendantDirty) 446 if (m_hasSelfPaintingLayerDescendantDirty)
456 updateHasSelfPaintingLayerDescendant(); 447 updateHasSelfPaintingLayerDescendant();
457 ASSERT(!m_hasSelfPaintingLayerDescendantDirty); 448 ASSERT(!m_hasSelfPaintingLayerDescendantDirty);
458 return m_hasSelfPaintingLayerDescendant; 449 return m_hasSelfPaintingLayerDescendant;
459 } 450 }
460 451
461 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende rBox(renderer())->location() : LayoutPoint(); } 452 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende rBox(renderer())->location() : LayoutPoint(); }
462 453
463 void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingIn fo&, PaintLayerFlags); 454 // paintLayerContents() assumes that the caller will clip to the bounds of t he painting dirty rect if necessary.
455 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay erFlags);
456
464 void paintLayerByApplyingTransform(GraphicsContext*, const LayerPaintingInfo &, PaintLayerFlags, const LayoutPoint& translationOffset = LayoutPoint()); 457 void paintLayerByApplyingTransform(GraphicsContext*, const LayerPaintingInfo &, PaintLayerFlags, const LayoutPoint& translationOffset = LayoutPoint());
465 458
466 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa intingInfo&, PaintLayerFlags); 459 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa intingInfo&, PaintLayerFlags);
467 460
468 void collectFragments(LayerFragments&, const RenderLayer* rootLayer, const L ayoutRect& dirtyRect, 461 void collectFragments(LayerFragments&, const RenderLayer* rootLayer, const L ayoutRect& dirtyRect,
469 ClipRectsCacheSlot, const LayoutPoint* offsetFromRoot = 0, 462 ClipRectsCacheSlot, const LayoutPoint* offsetFromRoot = 0,
470 const LayoutSize& subPixelAccumulation = LayoutSize(), const LayoutRect* layerBoundingBox = 0); 463 const LayoutSize& subPixelAccumulation = LayoutSize(), const LayoutRect* layerBoundingBox = 0);
471 void updatePaintingInfoForFragments(LayerFragments&, const LayerPaintingInfo &, PaintLayerFlags, bool shouldPaintContent, const LayoutPoint* offsetFromRoot); 464 void updatePaintingInfoForFragments(LayerFragments&, const LayerPaintingInfo &, PaintLayerFlags, bool shouldPaintContent, const LayoutPoint* offsetFromRoot);
472 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, Gr aphicsContext* transparencyLayerContext, 465 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, Gr aphicsContext* transparencyLayerContext,
473 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, Pai ntLayerFlags); 466 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, Pai ntLayerFlags);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 589
597 } // namespace blink 590 } // namespace blink
598 591
599 #ifndef NDEBUG 592 #ifndef NDEBUG
600 // Outside the WebCore namespace for ease of invocation from gdb. 593 // Outside the WebCore namespace for ease of invocation from gdb.
601 void showLayerTree(const blink::RenderLayer*); 594 void showLayerTree(const blink::RenderLayer*);
602 void showLayerTree(const blink::RenderObject*); 595 void showLayerTree(const blink::RenderObject*);
603 #endif 596 #endif
604 597
605 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ 598 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698