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

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

Issue 2290903002: Change (Pass)RefPtr<SkXxx> into sk_sp<SkXxx>. (Closed)
Patch Set: Rebasing... Created 4 years, 3 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 #include "core/paint/SVGInlineTextBoxPainter.h" 5 #include "core/paint/SVGInlineTextBoxPainter.h"
6 6
7 #include "core/editing/Editor.h" 7 #include "core/editing/Editor.h"
8 #include "core/editing/markers/DocumentMarkerController.h" 8 #include "core/editing/markers/DocumentMarkerController.h"
9 #include "core/editing/markers/RenderedDocumentMarker.h" 9 #include "core/editing/markers/RenderedDocumentMarker.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 paintServerTransform.scale(scalingFactor); 345 paintServerTransform.scale(scalingFactor);
346 additionalPaintServerTransform = &paintServerTransform; 346 additionalPaintServerTransform = &paintServerTransform;
347 } 347 }
348 348
349 if (!SVGPaintContext::paintForLayoutObject(paintInfo, style, parentInlineLay outObject(), resourceMode, paint, additionalPaintServerTransform)) 349 if (!SVGPaintContext::paintForLayoutObject(paintInfo, style, parentInlineLay outObject(), resourceMode, paint, additionalPaintServerTransform))
350 return false; 350 return false;
351 paint.setAntiAlias(true); 351 paint.setAntiAlias(true);
352 352
353 if (hasShadow(paintInfo, style)) { 353 if (hasShadow(paintInfo, style)) {
354 std::unique_ptr<DrawLooperBuilder> drawLooperBuilder = style.textShadow( )->createDrawLooper(DrawLooperBuilder::ShadowRespectsAlpha, style.visitedDepende ntColor(CSSPropertyColor)); 354 std::unique_ptr<DrawLooperBuilder> drawLooperBuilder = style.textShadow( )->createDrawLooper(DrawLooperBuilder::ShadowRespectsAlpha, style.visitedDepende ntColor(CSSPropertyColor));
355 paint.setLooper(toSkSp(drawLooperBuilder->detachDrawLooper())); 355 paint.setLooper(drawLooperBuilder->detachDrawLooper());
356 } 356 }
357 357
358 if (resourceMode == ApplyToStrokeMode) { 358 if (resourceMode == ApplyToStrokeMode) {
359 StrokeData strokeData; 359 StrokeData strokeData;
360 SVGLayoutSupport::applyStrokeStyleToStrokeData(strokeData, style, parent InlineLayoutObject(), 1); 360 SVGLayoutSupport::applyStrokeStyleToStrokeData(strokeData, style, parent InlineLayoutObject(), 1);
361 if (style.svgStyle().vectorEffect() != VE_NON_SCALING_STROKE) 361 if (style.svgStyle().vectorEffect() != VE_NON_SCALING_STROKE)
362 strokeData.setThickness(strokeData.thickness() * scalingFactor); 362 strokeData.setThickness(strokeData.thickness() * scalingFactor);
363 strokeData.setupPaint(&paint); 363 strokeData.setupPaint(&paint);
364 } 364 }
365 return true; 365 return true;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 stateSaver.save(); 533 stateSaver.save();
534 paintInfo.context.concatCTM(fragment.buildFragmentTransform()); 534 paintInfo.context.concatCTM(fragment.buildFragmentTransform());
535 } 535 }
536 FloatRect fragmentRect = m_svgInlineTextBox.selectionRectForTextFragment (fragment, textMatchInfo.startPosition, textMatchInfo.endPosition, style); 536 FloatRect fragmentRect = m_svgInlineTextBox.selectionRectForTextFragment (fragment, textMatchInfo.startPosition, textMatchInfo.endPosition, style);
537 paintInfo.context.setFillColor(color); 537 paintInfo.context.setFillColor(color);
538 paintInfo.context.fillRect(fragmentRect); 538 paintInfo.context.fillRect(fragmentRect);
539 } 539 }
540 } 540 }
541 541
542 } // namespace blink 542 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp ('k') | third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698