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

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

Issue 2124553002: Refine cull rect for SVGInlineTextBox painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add boundsForDrawingRecorder; expose helper from InlineTextBoxPainter Created 4 years, 5 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
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 SVGInlineTextBoxPainter_h 5 #ifndef SVGInlineTextBoxPainter_h
6 #define SVGInlineTextBoxPainter_h 6 #define SVGInlineTextBoxPainter_h
7 7
8 #include "core/style/ComputedStyleConstants.h" 8 #include "core/style/ComputedStyleConstants.h"
9 #include "core/layout/svg/LayoutSVGResourcePaintServer.h" 9 #include "core/layout/svg/LayoutSVGResourcePaintServer.h"
10 #include "wtf/Allocator.h" 10 #include "wtf/Allocator.h"
(...skipping 27 matching lines...) Expand all
38 STACK_ALLOCATED(); 38 STACK_ALLOCATED();
39 public: 39 public:
40 SVGInlineTextBoxPainter(const SVGInlineTextBox& svgInlineTextBox) : m_svgInl ineTextBox(svgInlineTextBox) { } 40 SVGInlineTextBoxPainter(const SVGInlineTextBox& svgInlineTextBox) : m_svgInl ineTextBox(svgInlineTextBox) { }
41 void paint(const PaintInfo&, const LayoutPoint&); 41 void paint(const PaintInfo&, const LayoutPoint&);
42 void paintSelectionBackground(const PaintInfo&); 42 void paintSelectionBackground(const PaintInfo&);
43 void paintTextMatchMarkerForeground(const PaintInfo&, const LayoutPoint&, Do cumentMarker*, const ComputedStyle&, const Font&); 43 void paintTextMatchMarkerForeground(const PaintInfo&, const LayoutPoint&, Do cumentMarker*, const ComputedStyle&, const Font&);
44 void paintTextMatchMarkerBackground(const PaintInfo&, const LayoutPoint&, Do cumentMarker*, const ComputedStyle&, const Font&); 44 void paintTextMatchMarkerBackground(const PaintInfo&, const LayoutPoint&, Do cumentMarker*, const ComputedStyle&, const Font&);
45 45
46 private: 46 private:
47 bool shouldPaintSelection(const PaintInfo&) const; 47 bool shouldPaintSelection(const PaintInfo&) const;
48 FloatRect boundsForDrawingRecorder(const LayoutPoint&, bool includeSelection Rect) const;
48 void paintTextFragments(const PaintInfo&, LayoutObject&); 49 void paintTextFragments(const PaintInfo&, LayoutObject&);
49 void paintDecoration(const PaintInfo&, TextDecoration, const SVGTextFragment &); 50 void paintDecoration(const PaintInfo&, TextDecoration, const SVGTextFragment &);
50 bool setupTextPaint(const PaintInfo&, const ComputedStyle&, LayoutSVGResourc eMode, SkPaint&); 51 bool setupTextPaint(const PaintInfo&, const ComputedStyle&, LayoutSVGResourc eMode, SkPaint&);
51 void paintText(const PaintInfo&, TextRun&, const SVGTextFragment&, int start Position, int endPosition, const SkPaint&); 52 void paintText(const PaintInfo&, TextRun&, const SVGTextFragment&, int start Position, int endPosition, const SkPaint&);
52 void paintText(const PaintInfo&, const ComputedStyle&, const ComputedStyle& selectionStyle, const SVGTextFragment&, LayoutSVGResourceMode, bool shouldPaintS election); 53 void paintText(const PaintInfo&, const ComputedStyle&, const ComputedStyle& selectionStyle, const SVGTextFragment&, LayoutSVGResourceMode, bool shouldPaintS election);
53 Vector<SVGTextFragmentWithRange> collectTextMatches(DocumentMarker*) const; 54 Vector<SVGTextFragmentWithRange> collectTextMatches(DocumentMarker*) const;
54 Vector<SVGTextFragmentWithRange> collectFragmentsInRange(int startPosition, int endPosition) const; 55 Vector<SVGTextFragmentWithRange> collectFragmentsInRange(int startPosition, int endPosition) const;
55 56
56 const SVGInlineTextBox& m_svgInlineTextBox; 57 const SVGInlineTextBox& m_svgInlineTextBox;
57 }; 58 };
58 59
59 } // namespace blink 60 } // namespace blink
60 61
61 #endif // SVGInlineTextBoxPainter_h 62 #endif // SVGInlineTextBoxPainter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698