move SkComputeAxisAlignmentForHText(const SkMatrix& matrix) out of inline,

since that isn't really necessary, and it is generating a warning/error for
some builds ('defined but not used')



git-svn-id: http://skia.googlecode.com/svn/trunk@2169 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-08-24 15:38:46 +00:00
parent b6ddf7a082
commit 2e68478d86
2 changed files with 13 additions and 11 deletions

View File

@ -307,17 +307,7 @@ enum SkAxisAlignment {
*
* As an example, the identity matrix will return kX_SkAxisAlignment
*/
static SkAxisAlignment SkComputeAxisAlignmentForHText(const SkMatrix& matrix) {
SkASSERT(!matrix.hasPerspective());
if (0 == matrix[SkMatrix::kMSkewY]) {
return kX_SkAxisAlignment;
}
if (0 == matrix[SkMatrix::kMScaleX]) {
return kY_SkAxisAlignment;
}
return kNone_SkAxisAlignment;
}
SkAxisAlignment SkComputeAxisAlignmentForHText(const SkMatrix& matrix);
#endif

View File

@ -710,6 +710,18 @@ void SkScalerContext::Rec::getSingleMatrix(SkMatrix* m) const {
m->postConcat(deviceMatrix);
}
SkAxisAlignment SkComputeAxisAlignmentForHText(const SkMatrix& matrix) {
SkASSERT(!matrix.hasPerspective());
if (0 == matrix[SkMatrix::kMSkewY]) {
return kX_SkAxisAlignment;
}
if (0 == matrix[SkMatrix::kMScaleX]) {
return kY_SkAxisAlignment;
}
return kNone_SkAxisAlignment;
}
///////////////////////////////////////////////////////////////////////////////
#include "SkFontHost.h"