| 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 26 matching lines...) Expand all Loading... |
| 37 // the translation required to get from flow thread coordinates to visual co
ordinates for a | 37 // the translation required to get from flow thread coordinates to visual co
ordinates for a |
| 38 // certain column. | 38 // certain column. |
| 39 // FIXME: The BorderRadiusClippingRule parameter is really useless now. If w
e want to skip self, | 39 // FIXME: The BorderRadiusClippingRule parameter is really useless now. If w
e want to skip self, |
| 40 // why not just supply the parent layer as the first parameter instead? | 40 // why not just supply the parent layer as the first parameter instead? |
| 41 static void applyRoundedRectClips(RenderLayer&, const LayerPaintingInfo&, Gr
aphicsContext*, const LayoutPoint& fragmentOffset, PaintLayerFlags, ClipRecorder
&, BorderRadiusClippingRule = IncludeSelfForBorderRadius); | 41 static void applyRoundedRectClips(RenderLayer&, const LayerPaintingInfo&, Gr
aphicsContext*, const LayoutPoint& fragmentOffset, PaintLayerFlags, ClipRecorder
&, BorderRadiusClippingRule = IncludeSelfForBorderRadius); |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 enum ClipState { HasNotClipped, HasClipped }; | 44 enum ClipState { HasNotClipped, HasClipped }; |
| 45 | 45 |
| 46 void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingIn
fo&, PaintLayerFlags); | 46 void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingIn
fo&, PaintLayerFlags); |
| 47 void paintLayerByApplyingTransform(GraphicsContext*, const LayerPaintingInfo
&, PaintLayerFlags, const LayoutPoint& translationOffset = LayoutPoint()); | 47 void paintLayerWithTransform(GraphicsContext*, const LayerPaintingInfo&, Pai
ntLayerFlags); |
| 48 void paintFragmentByApplyingTransform(GraphicsContext*, const LayerPaintingI
nfo&, PaintLayerFlags, const LayoutPoint& fragmentTranslation); |
| 48 | 49 |
| 49 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa
intingInfo&, PaintLayerFlags); | 50 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa
intingInfo&, PaintLayerFlags); |
| 50 void paintPaginatedChildLayer(RenderLayer* childLayer, GraphicsContext*, con
st LayerPaintingInfo&, PaintLayerFlags); | 51 void paintPaginatedChildLayer(RenderLayer* childLayer, GraphicsContext*, con
st LayerPaintingInfo&, PaintLayerFlags); |
| 51 void paintChildLayerIntoColumns(RenderLayer* childLayer, GraphicsContext*, c
onst LayerPaintingInfo&, PaintLayerFlags, const Vector<RenderLayer*>& columnLaye
rs, size_t columnIndex); | 52 void paintChildLayerIntoColumns(RenderLayer* childLayer, GraphicsContext*, c
onst LayerPaintingInfo&, PaintLayerFlags, const Vector<RenderLayer*>& columnLaye
rs, size_t columnIndex); |
| 52 bool atLeastOneFragmentIntersectsDamageRect(LayerFragments&, const LayerPain
tingInfo&, PaintLayerFlags, const LayoutPoint& offsetFromRoot); | 53 bool atLeastOneFragmentIntersectsDamageRect(LayerFragments&, const LayerPain
tingInfo&, PaintLayerFlags, const LayoutPoint& offsetFromRoot); |
| 53 void paintFragmentWithPhase(PaintPhase, const LayerFragment&, GraphicsContex
t*, const ClipRect&, const LayerPaintingInfo&, PaintBehavior, RenderObject* pain
tingRootForRenderer, PaintLayerFlags, ClipState); | 54 void paintFragmentWithPhase(PaintPhase, const LayerFragment&, GraphicsContex
t*, const ClipRect&, const LayerPaintingInfo&, PaintBehavior, RenderObject* pain
tingRootForRenderer, PaintLayerFlags, ClipState); |
| 54 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, | 55 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, |
| 55 const LayoutRect& transparencyPaintDirtyRect, const LayerPaintingInfo&,
PaintBehavior, RenderObject* paintingRootForRenderer, PaintLayerFlags); | 56 const LayoutRect& transparencyPaintDirtyRect, const LayerPaintingInfo&,
PaintBehavior, RenderObject* paintingRootForRenderer, PaintLayerFlags); |
| 56 void paintForegroundForFragments(const LayerFragments&, GraphicsContext*, | 57 void paintForegroundForFragments(const LayerFragments&, GraphicsContext*, |
| 57 const LayoutRect& transparencyPaintDirtyRect, const LayerPaintingInfo&,
PaintBehavior, RenderObject* paintingRootForRenderer, | 58 const LayoutRect& transparencyPaintDirtyRect, const LayerPaintingInfo&,
PaintBehavior, RenderObject* paintingRootForRenderer, |
| 58 bool selectionOnly, PaintLayerFlags); | 59 bool selectionOnly, PaintLayerFlags); |
| 59 void paintForegroundForFragmentsWithPhase(PaintPhase, const LayerFragments&,
GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* painti
ngRootForRenderer, PaintLayerFlags, ClipState); | 60 void paintForegroundForFragmentsWithPhase(PaintPhase, const LayerFragments&,
GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* painti
ngRootForRenderer, PaintLayerFlags, ClipState); |
| 60 void paintOutlineForFragments(const LayerFragments&, GraphicsContext*, const
LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, Paint
LayerFlags); | 61 void paintOutlineForFragments(const LayerFragments&, GraphicsContext*, const
LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, Paint
LayerFlags); |
| 61 void paintOverflowControlsForFragments(const LayerFragments&, GraphicsContex
t*, const LayerPaintingInfo&, PaintLayerFlags); | 62 void paintOverflowControlsForFragments(const LayerFragments&, GraphicsContex
t*, const LayerPaintingInfo&, PaintLayerFlags); |
| 62 void paintMaskForFragments(const LayerFragments&, GraphicsContext*, const La
yerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayerFlags); | 63 void paintMaskForFragments(const LayerFragments&, GraphicsContext*, const La
yerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayerFlags); |
| 63 void paintChildClippingMaskForFragments(const LayerFragments&, GraphicsConte
xt*, const LayerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayer
Flags); | 64 void paintChildClippingMaskForFragments(const LayerFragments&, GraphicsConte
xt*, const LayerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayer
Flags); |
| 64 void paintTransformedLayerIntoFragments(GraphicsContext*, const LayerPaintin
gInfo&, PaintLayerFlags); | |
| 65 | 65 |
| 66 static bool needsToClip(const LayerPaintingInfo& localPaintingInfo, const Cl
ipRect&); | 66 static bool needsToClip(const LayerPaintingInfo& localPaintingInfo, const Cl
ipRect&); |
| 67 | 67 |
| 68 // Returns whether this layer should be painted during sofware painting (i.e
., not via calls from CompositedLayerMapping to draw into composited | 68 // Returns whether this layer should be painted during sofware painting (i.e
., not via calls from CompositedLayerMapping to draw into composited |
| 69 // layers). | 69 // layers). |
| 70 bool shouldPaintLayerInSoftwareMode(const LayerPaintingInfo&, PaintLayerFlag
s paintFlags); | 70 bool shouldPaintLayerInSoftwareMode(const LayerPaintingInfo&, PaintLayerFlag
s paintFlags); |
| 71 | 71 |
| 72 RenderLayer& m_renderLayer; | 72 RenderLayer& m_renderLayer; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace blink | 75 } // namespace blink |
| 76 | 76 |
| 77 #endif // LayerPainter_h | 77 #endif // LayerPainter_h |
| OLD | NEW |