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

Side by Side Diff: Source/core/paint/LayerPainter.h

Issue 801053005: [New Multicolumn] Render transformed layers into multiple fragments. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase master Created 5 years, 10 months 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
« no previous file with comments | « Source/core/layout/Layer.cpp ('k') | Source/core/paint/LayerPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/layout/LayerFragment.h" 8 #include "core/layout/LayerFragment.h"
9 #include "core/layout/LayerPaintingInfo.h" 9 #include "core/layout/LayerPaintingInfo.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class ClipRect; 13 class ClipRect;
14 class LayoutPoint; 14 class LayoutPoint;
15 class Layer; 15 class Layer;
16 16
17 class LayerPainter { 17 class LayerPainter {
18 public: 18 public:
19 enum FragmentPolicy { AllowMultipleFragments, ForceSingleFragment };
20
19 LayerPainter(Layer& renderLayer) : m_renderLayer(renderLayer) { } 21 LayerPainter(Layer& renderLayer) : m_renderLayer(renderLayer) { }
20 22
21 // The paint() method paints the layers that intersect the damage rect from back to front. 23 // The paint() method paints the layers that intersect the damage rect from back to front.
22 // paint() assumes that the caller will clip to the bounds of damageRect if necessary. 24 // paint() assumes that the caller will clip to the bounds of damageRect if necessary.
23 void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = P aintBehaviorNormal, LayoutObject* paintingRoot = 0, PaintLayerFlags = 0); 25 void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = P aintBehaviorNormal, LayoutObject* paintingRoot = 0, PaintLayerFlags = 0);
24 // paintLayer() assumes that the caller will clip to the bounds of the paint ing dirty if necessary. 26 // paintLayer() assumes that the caller will clip to the bounds of the paint ing dirty if necessary.
25 void paintLayer(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags) ; 27 void paintLayer(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags) ;
26 // paintLayerContents() assumes that the caller will clip to the bounds of t he painting dirty rect if necessary. 28 // paintLayerContents() assumes that the caller will clip to the bounds of t he painting dirty rect if necessary.
27 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay erFlags); 29 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay erFlags, FragmentPolicy = AllowMultipleFragments);
28 30
29 void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior, LayoutObject* paintingRoot = 0); 31 void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior, LayoutObject* paintingRoot = 0);
30 32
31 private: 33 private:
32 enum ClipState { HasNotClipped, HasClipped }; 34 enum ClipState { HasNotClipped, HasClipped };
33 35
34 void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingIn fo&, PaintLayerFlags); 36 void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingIn fo&, PaintLayerFlags, FragmentPolicy = AllowMultipleFragments);
35 void paintLayerWithTransform(GraphicsContext*, const LayerPaintingInfo&, Pai ntLayerFlags); 37 void paintLayerWithTransform(GraphicsContext*, const LayerPaintingInfo&, Pai ntLayerFlags);
36 void paintFragmentByApplyingTransform(GraphicsContext*, const LayerPaintingI nfo&, PaintLayerFlags, const LayoutPoint& fragmentTranslation); 38 void paintFragmentByApplyingTransform(GraphicsContext*, const LayerPaintingI nfo&, PaintLayerFlags, const LayoutPoint& fragmentTranslation);
37 39
38 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa intingInfo&, PaintLayerFlags); 40 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa intingInfo&, PaintLayerFlags);
39 void paintPaginatedChildLayer(Layer* childLayer, GraphicsContext*, const Lay erPaintingInfo&, PaintLayerFlags); 41 void paintPaginatedChildLayer(Layer* childLayer, GraphicsContext*, const Lay erPaintingInfo&, PaintLayerFlags);
40 void paintChildLayerIntoColumns(Layer* childLayer, GraphicsContext*, const L ayerPaintingInfo&, PaintLayerFlags, const Vector<Layer*>& columnLayers, size_t c olumnIndex); 42 void paintChildLayerIntoColumns(Layer* childLayer, GraphicsContext*, const L ayerPaintingInfo&, PaintLayerFlags, const Vector<Layer*>& columnLayers, size_t c olumnIndex);
41 bool atLeastOneFragmentIntersectsDamageRect(LayerFragments&, const LayerPain tingInfo&, PaintLayerFlags, const LayoutPoint& offsetFromRoot); 43 bool atLeastOneFragmentIntersectsDamageRect(LayerFragments&, const LayerPain tingInfo&, PaintLayerFlags, const LayoutPoint& offsetFromRoot);
42 void paintFragmentWithPhase(PaintPhase, const LayerFragment&, GraphicsContex t*, const ClipRect&, const LayerPaintingInfo&, PaintBehavior, LayoutObject* pain tingRootForRenderer, PaintLayerFlags, ClipState); 44 void paintFragmentWithPhase(PaintPhase, const LayerFragment&, GraphicsContex t*, const ClipRect&, const LayerPaintingInfo&, PaintBehavior, LayoutObject* pain tingRootForRenderer, PaintLayerFlags, ClipState);
43 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, 45 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*,
44 const LayoutRect& transparencyPaintDirtyRect, const LayerPaintingInfo&, PaintBehavior, LayoutObject* paintingRootForRenderer, PaintLayerFlags); 46 const LayoutRect& transparencyPaintDirtyRect, const LayerPaintingInfo&, PaintBehavior, LayoutObject* paintingRootForRenderer, PaintLayerFlags);
(...skipping 11 matching lines...) Expand all
56 // Returns whether this layer should be painted during sofware painting (i.e ., not via calls from CompositedLayerMapping to draw into composited 58 // Returns whether this layer should be painted during sofware painting (i.e ., not via calls from CompositedLayerMapping to draw into composited
57 // layers). 59 // layers).
58 bool shouldPaintLayerInSoftwareMode(const LayerPaintingInfo&, PaintLayerFlag s paintFlags); 60 bool shouldPaintLayerInSoftwareMode(const LayerPaintingInfo&, PaintLayerFlag s paintFlags);
59 61
60 Layer& m_renderLayer; 62 Layer& m_renderLayer;
61 }; 63 };
62 64
63 } // namespace blink 65 } // namespace blink
64 66
65 #endif // LayerPainter_h 67 #endif // LayerPainter_h
OLDNEW
« no previous file with comments | « Source/core/layout/Layer.cpp ('k') | Source/core/paint/LayerPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698