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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerPainter.h

Issue 2430313004: Paint collapsed borders of a table as one display item (Closed)
Patch Set: Improve raster performance Created 4 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 // 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 PaintLayerPainter_h 5 #ifndef PaintLayerPainter_h
6 #define PaintLayerPainter_h 6 #define PaintLayerPainter_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/paint/PaintLayerFragment.h" 9 #include "core/paint/PaintLayerFragment.h"
10 #include "core/paint/PaintLayerPaintingInfo.h" 10 #include "core/paint/PaintLayerPaintingInfo.h"
11 #include "core/paint/PaintResult.h"
11 #include "wtf/Allocator.h" 12 #include "wtf/Allocator.h"
12 13
13 namespace blink { 14 namespace blink {
14 15
15 class ClipRect; 16 class ClipRect;
16 class PaintLayer; 17 class PaintLayer;
17 class GraphicsContext; 18 class GraphicsContext;
18 class LayoutPoint; 19 class LayoutPoint;
19 20
20 // This class is responsible for painting self-painting PaintLayer. 21 // This class is responsible for painting self-painting PaintLayer.
21 // 22 //
22 // See PainterLayer SELF-PAINTING LAYER section about what 'self-painting' 23 // See PainterLayer SELF-PAINTING LAYER section about what 'self-painting'
23 // means and how it impacts this class. 24 // means and how it impacts this class.
24 class CORE_EXPORT PaintLayerPainter { 25 class CORE_EXPORT PaintLayerPainter {
25 STACK_ALLOCATED(); 26 STACK_ALLOCATED();
26 27
27 public: 28 public:
28 enum FragmentPolicy { AllowMultipleFragments, ForceSingleFragment }; 29 enum FragmentPolicy { AllowMultipleFragments, ForceSingleFragment };
29 30
30 // When adding new values, must update the number of bits of
31 // PaintLayer::m_previousPaintingResult.
32 enum PaintResult {
33 // The layer is fully painted. This includes cases that nothing needs
34 // painting regardless of the paint rect.
35 FullyPainted,
36 // Some part of the layer is out of the paint rect and may be not fully
37 // painted. The results cannot be cached because they may change when paint
38 // rect changes.
39 MayBeClippedByPaintDirtyRect
40 };
41
42 PaintLayerPainter(PaintLayer& paintLayer) : m_paintLayer(paintLayer) {} 31 PaintLayerPainter(PaintLayer& paintLayer) : m_paintLayer(paintLayer) {}
43 32
44 // The paint() method paints the layers that intersect the damage rect from 33 // The paint() method paints the layers that intersect the damage rect from
45 // back to front. paint() assumes that the caller will clip to the bounds of 34 // back to front. paint() assumes that the caller will clip to the bounds of
46 // damageRect if necessary. 35 // damageRect if necessary.
47 void paint(GraphicsContext&, 36 void paint(GraphicsContext&,
48 const LayoutRect& damageRect, 37 const LayoutRect& damageRect,
49 const GlobalPaintFlags = GlobalPaintNormalPhase, 38 const GlobalPaintFlags = GlobalPaintNormalPhase,
50 PaintLayerFlags = 0); 39 PaintLayerFlags = 0);
51 // paintLayer() assumes that the caller will clip to the bounds of the 40 // paintLayer() assumes that the caller will clip to the bounds of the
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // not via calls from CompositedLayerMapping to draw into composited layers). 127 // not via calls from CompositedLayerMapping to draw into composited layers).
139 bool shouldPaintLayerInSoftwareMode(const GlobalPaintFlags, 128 bool shouldPaintLayerInSoftwareMode(const GlobalPaintFlags,
140 PaintLayerFlags paintFlags); 129 PaintLayerFlags paintFlags);
141 130
142 PaintLayer& m_paintLayer; 131 PaintLayer& m_paintLayer;
143 }; 132 };
144 133
145 } // namespace blink 134 } // namespace blink
146 135
147 #endif // PaintLayerPainter_h 136 #endif // PaintLayerPainter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698