summaryrefslogtreecommitdiff
path: root/libs/hwui/Layer.cpp
diff options
context:
space:
mode:
author Mike Reed <reed@google.com> 2021-01-28 18:06:26 -0500
committer Mike Reed <reed@google.com> 2021-01-29 11:46:48 -0500
commit7994a3120b96f079a8100599f1bb5a5a6571e96e (patch)
tree7fdcb2b4cd4d677467d5b47560c72facff33c8a8 /libs/hwui/Layer.cpp
parent7ee87037f51e651e43c207c67582b36999b3de4a (diff)
Modernize calls to drawImage
1. drawBitmap --> drawImage 2. drawImage now always requires sampling parameter Bug:178700363 Test: make Change-Id: I96f610a180b3774ba955cc334949fd62b1cf4d69
Diffstat (limited to 'libs/hwui/Layer.cpp')
-rw-r--r--libs/hwui/Layer.cpp5
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();