Chromium Code Reviews| 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 ObjectPainter_h | 5 #ifndef ObjectPainter_h |
| 6 #define ObjectPainter_h | 6 #define ObjectPainter_h |
| 7 | 7 |
| 8 #include "core/style/ComputedStyleConstants.h" | 8 #include "core/style/ComputedStyleConstants.h" |
| 9 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
| 10 #include "wtf/Vector.h" | 10 #include "wtf/Vector.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 // Also see core/paint/README.md. | 53 // Also see core/paint/README.md. |
| 54 // | 54 // |
| 55 // It is expected that the caller will call this function independent of the | 55 // It is expected that the caller will call this function independent of the |
| 56 // value of paintInfo.phase, and this function will do atomic paint (for | 56 // value of paintInfo.phase, and this function will do atomic paint (for |
| 57 // PaintPhaseForeground), normal paint (for PaintPhaseSelection and | 57 // PaintPhaseForeground), normal paint (for PaintPhaseSelection and |
| 58 // PaintPhaseTextClip) or nothing (other paint phases) according to | 58 // PaintPhaseTextClip) or nothing (other paint phases) according to |
| 59 // paintInfo.phase. | 59 // paintInfo.phase. |
| 60 void paintAllPhasesAtomically(const PaintInfo&, | 60 void paintAllPhasesAtomically(const PaintInfo&, |
| 61 const LayoutPoint& paintOffset); | 61 const LayoutPoint& paintOffset); |
| 62 | 62 |
| 63 void checkPaintOffset(const PaintInfo& paintInfo, | |
|
pdr.
2016/11/10 07:35:32
Add a comment here:
// SPV2 computes paint offsets
Xianzhu
2016/11/10 17:41:10
Done.
pdr.
2016/11/10 18:54:11
SGTM. Followups are always great.
| |
| 64 const LayoutPoint& paintOffset) { | |
| 65 #if DCHECK_IS_ON() | |
| 66 doCheckPaintOffset(paintInfo, paintOffset); | |
| 67 #endif | |
| 68 } | |
| 69 | |
| 63 private: | 70 private: |
| 64 static void drawDashedOrDottedBoxSide(GraphicsContext&, | 71 static void drawDashedOrDottedBoxSide(GraphicsContext&, |
| 65 int x1, | 72 int x1, |
| 66 int y1, | 73 int y1, |
| 67 int x2, | 74 int x2, |
| 68 int y2, | 75 int y2, |
| 69 BoxSide, | 76 BoxSide, |
| 70 Color, | 77 Color, |
| 71 int thickness, | 78 int thickness, |
| 72 EBorderStyle, | 79 EBorderStyle, |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 98 int x1, | 105 int x1, |
| 99 int y1, | 106 int y1, |
| 100 int x2, | 107 int x2, |
| 101 int y2, | 108 int y2, |
| 102 BoxSide, | 109 BoxSide, |
| 103 Color, | 110 Color, |
| 104 int adjacentWidth1, | 111 int adjacentWidth1, |
| 105 int adjacentWidth2, | 112 int adjacentWidth2, |
| 106 bool antialias); | 113 bool antialias); |
| 107 | 114 |
| 115 #if DCHECK_IS_ON() | |
| 116 void doCheckPaintOffset(const PaintInfo&, const LayoutPoint& paintOffset); | |
| 117 #endif | |
| 118 | |
| 108 const LayoutObject& m_layoutObject; | 119 const LayoutObject& m_layoutObject; |
| 109 }; | 120 }; |
| 110 | 121 |
| 111 } // namespace blink | 122 } // namespace blink |
| 112 | 123 |
| 113 #endif | 124 #endif |
| OLD | NEW |