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

Unified Diff: src/core/SkPictureShader.cpp

Issue 1327943003: Clean up some lint complaints and fix center_of_mass() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/batches/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureShader.cpp
diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp
index 81e8ab42eed69e18efdd551a3a22ebf56e30ea29..80d5974b057e1de0428d10267bfee60d5706cf64 100644
--- a/src/core/SkPictureShader.cpp
+++ b/src/core/SkPictureShader.cpp
@@ -155,12 +155,12 @@ void SkPictureShader::flatten(SkWriteBuffer& buffer) const {
}
}
-SkShader* SkPictureShader::refBitmapShader(const SkMatrix& matrix, const SkMatrix* localM,
- const int maxTextureSize) const {
+SkShader* SkPictureShader::refBitmapShader(const SkMatrix& viewMatrix, const SkMatrix* localM,
+ const int maxTextureSize) const {
SkASSERT(fPicture && !fPicture->cullRect().isEmpty());
SkMatrix m;
- m.setConcat(matrix, this->getLocalMatrix());
+ m.setConcat(viewMatrix, this->getLocalMatrix());
if (localM) {
m.preConcat(*localM);
}
@@ -215,12 +215,12 @@ SkShader* SkPictureShader::refBitmapShader(const SkMatrix& matrix, const SkMatri
this->getLocalMatrix());
if (!SkResourceCache::Find(key, BitmapShaderRec::Visitor, &tileShader)) {
- SkMatrix matrix;
- matrix.setRectToRect(fTile, SkRect::MakeIWH(tileSize.width(), tileSize.height()),
+ SkMatrix tileMatrix;
+ tileMatrix.setRectToRect(fTile, SkRect::MakeIWH(tileSize.width(), tileSize.height()),
SkMatrix::kFill_ScaleToFit);
SkBitmap bm;
if (!SkInstallDiscardablePixelRef(
- SkImageGenerator::NewFromPicture(tileSize, fPicture, &matrix, nullptr), &bm)) {
+ SkImageGenerator::NewFromPicture(tileSize, fPicture, &tileMatrix, nullptr), &bm)) {
return nullptr;
}
« no previous file with comments | « no previous file | src/gpu/batches/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698