| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef LayerPainter_h | 5 #ifndef LayerPainter_h |
| 6 #define LayerPainter_h | 6 #define LayerPainter_h |
| 7 | 7 |
| 8 #include "core/paint/ClipRecorder.h" | 8 #include "core/paint/ClipRecorder.h" |
| 9 #include "core/rendering/LayerFragment.h" | 9 #include "core/rendering/LayerFragment.h" |
| 10 #include "core/rendering/LayerPaintingInfo.h" | 10 #include "core/rendering/LayerPaintingInfo.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 void paintLayer(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags)
; | 26 void paintLayer(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags)
; |
| 27 // paintLayerContents() assumes that the caller will clip to the bounds of t
he painting dirty rect if necessary. | 27 // paintLayerContents() assumes that the caller will clip to the bounds of t
he painting dirty rect if necessary. |
| 28 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay
erFlags); | 28 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay
erFlags); |
| 29 | 29 |
| 30 void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect,
PaintBehavior, RenderObject* paintingRoot = 0); | 30 void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect,
PaintBehavior, RenderObject* paintingRoot = 0); |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 enum ClipState { HasNotClipped, HasClipped }; | 33 enum ClipState { HasNotClipped, HasClipped }; |
| 34 | 34 |
| 35 void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingIn
fo&, PaintLayerFlags); | 35 void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingIn
fo&, PaintLayerFlags); |
| 36 void paintLayerByApplyingTransform(GraphicsContext*, const LayerPaintingInfo
&, PaintLayerFlags, const LayoutPoint& translationOffset = LayoutPoint()); | 36 void paintLayerWithTransform(GraphicsContext*, const LayerPaintingInfo&, Pai
ntLayerFlags); |
| 37 void paintFragmentByApplyingTransform(GraphicsContext*, const LayerPaintingI
nfo&, PaintLayerFlags, const LayoutPoint& fragmentTranslation); |
| 37 | 38 |
| 38 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa
intingInfo&, PaintLayerFlags); | 39 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa
intingInfo&, PaintLayerFlags); |
| 39 void paintPaginatedChildLayer(RenderLayer* childLayer, GraphicsContext*, con
st LayerPaintingInfo&, PaintLayerFlags); | 40 void paintPaginatedChildLayer(RenderLayer* childLayer, GraphicsContext*, con
st LayerPaintingInfo&, PaintLayerFlags); |
| 40 void paintChildLayerIntoColumns(RenderLayer* childLayer, GraphicsContext*, c
onst LayerPaintingInfo&, PaintLayerFlags, const Vector<RenderLayer*>& columnLaye
rs, size_t columnIndex); | 41 void paintChildLayerIntoColumns(RenderLayer* childLayer, GraphicsContext*, c
onst LayerPaintingInfo&, PaintLayerFlags, const Vector<RenderLayer*>& columnLaye
rs, size_t columnIndex); |
| 41 bool atLeastOneFragmentIntersectsDamageRect(LayerFragments&, const LayerPain
tingInfo&, PaintLayerFlags, const LayoutPoint& offsetFromRoot); | 42 bool atLeastOneFragmentIntersectsDamageRect(LayerFragments&, const LayerPain
tingInfo&, PaintLayerFlags, const LayoutPoint& offsetFromRoot); |
| 42 void paintFragmentWithPhase(PaintPhase, const LayerFragment&, GraphicsContex
t*, const ClipRect&, const LayerPaintingInfo&, PaintBehavior, RenderObject* pain
tingRootForRenderer, PaintLayerFlags, ClipState); | 43 void paintFragmentWithPhase(PaintPhase, const LayerFragment&, GraphicsContex
t*, const ClipRect&, const LayerPaintingInfo&, PaintBehavior, RenderObject* pain
tingRootForRenderer, PaintLayerFlags, ClipState); |
| 43 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, | 44 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, |
| 44 const LayoutRect& transparencyPaintDirtyRect, const LayerPaintingInfo&,
PaintBehavior, RenderObject* paintingRootForRenderer, PaintLayerFlags); | 45 const LayoutRect& transparencyPaintDirtyRect, const LayerPaintingInfo&,
PaintBehavior, RenderObject* paintingRootForRenderer, PaintLayerFlags); |
| 45 void paintForegroundForFragments(const LayerFragments&, GraphicsContext*, | 46 void paintForegroundForFragments(const LayerFragments&, GraphicsContext*, |
| 46 const LayoutRect& transparencyPaintDirtyRect, const LayerPaintingInfo&,
PaintBehavior, RenderObject* paintingRootForRenderer, | 47 const LayoutRect& transparencyPaintDirtyRect, const LayerPaintingInfo&,
PaintBehavior, RenderObject* paintingRootForRenderer, |
| 47 bool selectionOnly, PaintLayerFlags); | 48 bool selectionOnly, PaintLayerFlags); |
| 48 void paintForegroundForFragmentsWithPhase(PaintPhase, const LayerFragments&,
GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* painti
ngRootForRenderer, PaintLayerFlags, ClipState); | 49 void paintForegroundForFragmentsWithPhase(PaintPhase, const LayerFragments&,
GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* painti
ngRootForRenderer, PaintLayerFlags, ClipState); |
| 49 void paintOutlineForFragments(const LayerFragments&, GraphicsContext*, const
LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, Paint
LayerFlags); | 50 void paintOutlineForFragments(const LayerFragments&, GraphicsContext*, const
LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, Paint
LayerFlags); |
| 50 void paintOverflowControlsForFragments(const LayerFragments&, GraphicsContex
t*, const LayerPaintingInfo&, PaintLayerFlags); | 51 void paintOverflowControlsForFragments(const LayerFragments&, GraphicsContex
t*, const LayerPaintingInfo&, PaintLayerFlags); |
| 51 void paintMaskForFragments(const LayerFragments&, GraphicsContext*, const La
yerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayerFlags); | 52 void paintMaskForFragments(const LayerFragments&, GraphicsContext*, const La
yerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayerFlags); |
| 52 void paintChildClippingMaskForFragments(const LayerFragments&, GraphicsConte
xt*, const LayerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayer
Flags); | 53 void paintChildClippingMaskForFragments(const LayerFragments&, GraphicsConte
xt*, const LayerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayer
Flags); |
| 53 void paintTransformedLayerIntoFragments(GraphicsContext*, const LayerPaintin
gInfo&, PaintLayerFlags); | |
| 54 | 54 |
| 55 static bool needsToClip(const LayerPaintingInfo& localPaintingInfo, const Cl
ipRect&); | 55 static bool needsToClip(const LayerPaintingInfo& localPaintingInfo, const Cl
ipRect&); |
| 56 | 56 |
| 57 // Returns whether this layer should be painted during sofware painting (i.e
., not via calls from CompositedLayerMapping to draw into composited | 57 // Returns whether this layer should be painted during sofware painting (i.e
., not via calls from CompositedLayerMapping to draw into composited |
| 58 // layers). | 58 // layers). |
| 59 bool shouldPaintLayerInSoftwareMode(const LayerPaintingInfo&, PaintLayerFlag
s paintFlags); | 59 bool shouldPaintLayerInSoftwareMode(const LayerPaintingInfo&, PaintLayerFlag
s paintFlags); |
| 60 | 60 |
| 61 RenderLayer& m_renderLayer; | 61 RenderLayer& m_renderLayer; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace blink | 64 } // namespace blink |
| 65 | 65 |
| 66 #endif // LayerPainter_h | 66 #endif // LayerPainter_h |
| OLD | NEW |