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

Unified Diff: src/core/SkDraw.cpp

Issue 200223008: Remove SkCanvas matrix ops return value. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Updated per comments Created 6 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: src/core/SkDraw.cpp
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 024fa1bc6a0a5a37aa49192c12e02afbb68caab9..946bf753101627bb77a3f9f46eb6793222eb2b9c 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -1056,10 +1056,7 @@ void SkDraw::drawPath(const SkPath& origSrcPath, const SkPaint& origPaint,
pathPtr->transform(*prePathMatrix, result);
pathPtr = result;
} else {
- if (!tmpMatrix.setConcat(*matrix, *prePathMatrix)) {
- // overflow
- return;
- }
+ tmpMatrix.setConcat(*matrix, *prePathMatrix);
matrix = &tmpMatrix;
}
}
@@ -1279,9 +1276,7 @@ void SkDraw::drawBitmap(const SkBitmap& bitmap, const SkMatrix& prematrix,
paint.setStyle(SkPaint::kFill_Style);
SkMatrix matrix;
- if (!matrix.setConcat(*fMatrix, prematrix)) {
- return;
- }
+ matrix.setConcat(*fMatrix, prematrix);
if (clipped_out(matrix, *fRC, bitmap.width(), bitmap.height())) {
return;
@@ -2394,7 +2389,8 @@ bool SkTriColorShader::setup(const SkPoint pts[], const SkColor colors[],
if (!m.invert(&im)) {
return false;
}
- return fDstToUnit.setConcat(im, this->getTotalInverse());
+ fDstToUnit.setConcat(im, this->getTotalInverse());
+ return true;
}
#include "SkColorPriv.h"
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkMatrix.cpp » ('j') | src/core/SkMatrix.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698