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 #include "core/paint/ObjectPainter.h" | 5 #include "core/paint/ObjectPainter.h" |
6 | 6 |
7 #include "core/layout/LayoutBlock.h" | 7 #include "core/layout/LayoutBlock.h" |
8 #include "core/layout/LayoutInline.h" | 8 #include "core/layout/LayoutInline.h" |
9 #include "core/layout/LayoutObject.h" | 9 #include "core/layout/LayoutObject.h" |
10 #include "core/layout/LayoutTheme.h" | 10 #include "core/layout/LayoutTheme.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 201 |
202 void fillQuad(GraphicsContext& context, | 202 void fillQuad(GraphicsContext& context, |
203 const FloatPoint quad[], | 203 const FloatPoint quad[], |
204 const Color& color, | 204 const Color& color, |
205 bool antialias) { | 205 bool antialias) { |
206 SkPath path; | 206 SkPath path; |
207 path.moveTo(quad[0]); | 207 path.moveTo(quad[0]); |
208 path.lineTo(quad[1]); | 208 path.lineTo(quad[1]); |
209 path.lineTo(quad[2]); | 209 path.lineTo(quad[2]); |
210 path.lineTo(quad[3]); | 210 path.lineTo(quad[3]); |
211 SkPaint paint(context.fillPaint()); | 211 PaintFlags paint(context.fillPaint()); |
212 paint.setAntiAlias(antialias); | 212 paint.setAntiAlias(antialias); |
213 paint.setColor(color.rgb()); | 213 paint.setColor(color.rgb()); |
214 | 214 |
215 context.drawPath(path, paint); | 215 context.drawPath(path, paint); |
216 } | 216 } |
217 | 217 |
218 } // namespace | 218 } // namespace |
219 | 219 |
220 void ObjectPainter::paintOutline(const PaintInfo& paintInfo, | 220 void ObjectPainter::paintOutline(const PaintInfo& paintInfo, |
221 const LayoutPoint& paintOffset) { | 221 const LayoutPoint& paintOffset) { |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 adjustedPaintOffset += toLayoutBox(m_layoutObject).location(); | 709 adjustedPaintOffset += toLayoutBox(m_layoutObject).location(); |
710 DCHECK(m_layoutObject.paintOffset() == adjustedPaintOffset) | 710 DCHECK(m_layoutObject.paintOffset() == adjustedPaintOffset) |
711 << " Paint offset mismatch: " << m_layoutObject.debugName() | 711 << " Paint offset mismatch: " << m_layoutObject.debugName() |
712 << " from PaintPropertyTreeBuilder: " | 712 << " from PaintPropertyTreeBuilder: " |
713 << m_layoutObject.paintOffset().toString() | 713 << m_layoutObject.paintOffset().toString() |
714 << " from painter: " << adjustedPaintOffset.toString(); | 714 << " from painter: " << adjustedPaintOffset.toString(); |
715 } | 715 } |
716 #endif | 716 #endif |
717 | 717 |
718 } // namespace blink | 718 } // namespace blink |
OLD | NEW |