diff options
| author | 2021-01-29 19:17:49 +0000 | |
|---|---|---|
| committer | 2021-01-29 19:17:49 +0000 | |
| commit | 8e79f01aba1dc1ac18528b1d38a68c74cc62f727 (patch) | |
| tree | 9245598c64ce45ecaed6bd8f70da2686fbbd8a72 /libs/hwui/Layer.cpp | |
| parent | dd56fa93f65b38f47883e88300aacb53902b8857 (diff) | |
| parent | 7994a3120b96f079a8100599f1bb5a5a6571e96e (diff) | |
Merge "Modernize calls to drawImage" into sc-dev
Diffstat (limited to 'libs/hwui/Layer.cpp')
| -rw-r--r-- | libs/hwui/Layer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp index f4c633fbe58f..ca2ada9e8141 100644 --- a/libs/hwui/Layer.cpp +++ b/libs/hwui/Layer.cpp @@ -127,10 +127,11 @@ void Layer::draw(SkCanvas* canvas) { const SkMatrix& totalMatrix = canvas->getTotalMatrix(); SkRect imageRect = SkRect::MakeIWH(layerImage->width(), layerImage->height()); + SkSamplingOptions sampling; if (getForceFilter() || shouldFilterRect(totalMatrix, imageRect, imageRect)) { - paint.setFilterQuality(kLow_SkFilterQuality); + sampling = SkSamplingOptions(SkFilterMode::kLinear); } - canvas->drawImage(layerImage.get(), 0, 0, &paint); + canvas->drawImage(layerImage.get(), 0, 0, sampling, &paint); // restore the original matrix if (nonIdentityMatrix) { canvas->restore(); |