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

Unified Diff: src/effects/SkTileImageFilter.cpp

Issue 245963010: Move SkShader::fLocalMatrix into SkShader constructor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 6 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 | « src/core/SkSmallAllocator.h ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkTileImageFilter.cpp
diff --git a/src/effects/SkTileImageFilter.cpp b/src/effects/SkTileImageFilter.cpp
index 5496f3003215a5f7254f4489239b8820d3c30483..f3bad76345232436f96318f67b8ed2bca10c6856 100644
--- a/src/effects/SkTileImageFilter.cpp
+++ b/src/effects/SkTileImageFilter.cpp
@@ -60,12 +60,12 @@ bool SkTileImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src,
SkPaint paint;
paint.setXfermodeMode(SkXfermode::kSrc_Mode);
- SkAutoTUnref<SkShader> shader(SkShader::CreateBitmapShader(subset,
- SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode));
SkMatrix shaderMatrix;
shaderMatrix.setTranslate(SkIntToScalar(srcOffset.fX),
SkIntToScalar(srcOffset.fY));
- shader->setLocalMatrix(shaderMatrix);
+ SkAutoTUnref<SkShader> shader(SkShader::CreateBitmapShader(subset,
+ SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode,
+ &shaderMatrix));
paint.setShader(shader);
canvas.translate(-dstRect.fLeft, -dstRect.fTop);
canvas.drawRect(dstRect, paint);
« no previous file with comments | « src/core/SkSmallAllocator.h ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698