зеркало из https://github.com/mozilla/moz-skia.git
abandon SK_IGNORE_TREAT_AS_SPRITE as a flag, and use SK_IGNORE_TRANS_CLAMP_FIX
for the fixes in SkDraw.cpp and SkBitmapProcState.cpp Also, change the call in SkDraw.cpp to pass 0 for subpixel bits, to match the old logic.... we should have a runtime fix for this in the future, so a caller *can* get subpixel-filtered images w/ just translate. git-svn-id: http://skia.googlecode.com/svn/trunk@7065 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
140d7286c5
Коммит
070dcd8ad3
|
@ -1114,7 +1114,7 @@ void SkDraw::drawPath(const SkPath& origSrcPath, const SkPaint& origPaint,
|
|||
go ahead and treat it as if it were, so that subsequent code can go fast.
|
||||
*/
|
||||
static bool just_translate(const SkMatrix& matrix, const SkBitmap& bitmap) {
|
||||
#ifdef SK_IGNORE_TREAT_AS_SPRITE
|
||||
#ifdef SK_IGNORE_TRANS_CLAMP_FIX
|
||||
SkMatrix::TypeMask mask = matrix.getType();
|
||||
|
||||
if (mask & (SkMatrix::kAffine_Mask | SkMatrix::kPerspective_Mask)) {
|
||||
|
@ -1132,7 +1132,9 @@ static bool just_translate(const SkMatrix& matrix, const SkBitmap& bitmap) {
|
|||
// if we got here, we're either kTranslate_Mask or identity
|
||||
return true;
|
||||
#else
|
||||
return SkTreatAsSpriteFilter(matrix, bitmap.width(), bitmap.height());
|
||||
unsigned bits = 0; // TODO: find a way to allow the caller to tell us to
|
||||
// respect filtering.
|
||||
return SkTreatAsSprite(matrix, bitmap.width(), bitmap.height(), bits);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче