зеркало из https://github.com/mozilla/pjs.git
Bug 702516 - Enable bilinear filtering for Skia. r=jrmuizel
This commit is contained in:
Родитель
76763a4683
Коммит
447edb89ff
|
@ -280,6 +280,7 @@ struct AutoPaintSetup {
|
|||
mPaint.setAlpha(aOptions.mAlpha*255.0);
|
||||
mAlpha = aOptions.mAlpha;
|
||||
}
|
||||
mPaint.setFilterBitmap(true);
|
||||
}
|
||||
|
||||
void SetPattern(const Pattern& aPattern)
|
||||
|
@ -386,7 +387,6 @@ DrawTargetSkia::DrawSurface(SourceSurface *aSurface,
|
|||
|
||||
MarkChanged();
|
||||
|
||||
NS_ASSERTION(aSurfOptions.mFilter == FILTER_LINEAR, "Only linear filtering supported currently!");
|
||||
SkRect destRect = RectToSkRect(aDest);
|
||||
SkRect sourceRect = RectToSkRect(aSource);
|
||||
|
||||
|
@ -399,6 +399,9 @@ DrawTargetSkia::DrawSurface(SourceSurface *aSurface,
|
|||
SkShader *shader = SkShader::CreateBitmapShader(bitmap, SkShader::kClamp_TileMode, SkShader::kClamp_TileMode);
|
||||
shader->setLocalMatrix(matrix);
|
||||
SkSafeUnref(paint.mPaint.setShader(shader));
|
||||
if (aSurfOptions.mFilter != FILTER_LINEAR) {
|
||||
paint.mPaint.setFilterBitmap(false);
|
||||
}
|
||||
mCanvas->drawRect(destRect, paint.mPaint);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче