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

Unified Diff: third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp

Issue 2846513002: More targeted resource-switching mechanism for SVG selection painting (Closed)
Patch Set: Use rALAP instead of first rAF Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/SVGResourcesCache.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
index c0eb9eaf0b399da78bcf8a74d95cfc5ef49cce7c..65fc6c73a391338f289b6aecf6b23e14278c7d9e 100644
--- a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
@@ -521,23 +521,15 @@ void SVGInlineTextBoxPainter::PaintText(const PaintInfo& paint_info,
// Draw text using selection style from the start to the end position of the
// selection.
- if (style != selection_style) {
- StyleDifference diff;
- diff.SetNeedsPaintInvalidationObject();
- SVGResourcesCache::ClientStyleChanged(&ParentInlineLayoutObject(), diff,
- selection_style);
- }
-
- PaintFlags flags;
- if (SetupTextPaint(paint_info, selection_style, resource_mode, flags))
- PaintText(paint_info, text_run, fragment, start_position, end_position,
- flags);
+ {
+ SVGResourcesCache::TemporaryStyleScope scope(ParentInlineLayoutObject(),
+ style, selection_style);
- if (style != selection_style) {
- StyleDifference diff;
- diff.SetNeedsPaintInvalidationObject();
- SVGResourcesCache::ClientStyleChanged(&ParentInlineLayoutObject(), diff,
- style);
+ PaintFlags flags;
+ if (SetupTextPaint(paint_info, selection_style, resource_mode, flags)) {
+ PaintText(paint_info, text_run, fragment, start_position, end_position,
+ flags);
+ }
}
// Eventually draw text using regular style from the end position of the
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/SVGResourcesCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698