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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp

Issue 1779833002: Switch Blink SkShader clients to sk_sp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
index c5ccd4bab6d02bff95220a111bb2e2e9cdb1834f..0fdf99cae15ddff02cd7c8c6f346156054f4326e 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
@@ -635,11 +635,11 @@ void GraphicsContext::drawLineForDocumentMarker(const FloatPoint& pt, float widt
SkMatrix localMatrix;
localMatrix.setTranslate(originX, originY);
- RefPtr<SkShader> shader = adoptRef(SkShader::CreateBitmapShader(
- *misspellBitmap[index], SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &localMatrix));
+ auto shader = SkShader::MakeBitmapShader(
+ *misspellBitmap[index], SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &localMatrix);
SkPaint paint;
- paint.setShader(shader.get());
+ paint.setShader(std::move(shader));
reed1 2016/03/09 21:09:06 what to push this up 3 lines, and eliminate the na
f(malita) 2016/03/10 13:57:57 Done.
SkRect rect;
rect.set(originX, originY, originX + WebCoreFloatToSkScalar(width) * deviceScaleFactor, originY + SkIntToScalar(misspellBitmap[index]->height()));

Powered by Google App Engine
This is Rietveld 408576698