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

Unified Diff: src/animator/SkDrawShader.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/animator/SkDrawGradient.cpp ('k') | src/animator/SkPaintPart.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/animator/SkDrawShader.cpp
diff --git a/src/animator/SkDrawShader.cpp b/src/animator/SkDrawShader.cpp
index e3aa4da028f8058473d2b467a32816cfa35edfaa..f9f379bf73b559d1f9d27a400e8de36e357716e3 100644
--- a/src/animator/SkDrawShader.cpp
+++ b/src/animator/SkDrawShader.cpp
@@ -36,9 +36,8 @@ bool SkDrawShader::add() {
return false;
}
-void SkDrawShader::addPostlude(SkShader* shader) {
- if (matrix)
- shader->setLocalMatrix(matrix->getMatrix());
+SkMatrix* SkDrawShader::getMatrix() {
+ return matrix ? &matrix->getMatrix() : NULL;
}
#if SK_USE_CONDENSED_INFO == 0
@@ -75,9 +74,9 @@ SkShader* SkDrawBitmapShader::getShader() {
// draw-time from the paint
SkShader* shader = SkShader::CreateBitmapShader(image->fBitmap,
(SkShader::TileMode) tileMode,
- (SkShader::TileMode) tileMode);
+ (SkShader::TileMode) tileMode,
+ getMatrix());
SkAutoTDelete<SkShader> autoDel(shader);
- addPostlude(shader);
(void)autoDel.detach();
return shader;
}
« no previous file with comments | « src/animator/SkDrawGradient.cpp ('k') | src/animator/SkPaintPart.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698