Loading libs/hwui/VectorDrawable.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -505,13 +505,11 @@ void Tree::draw(SkCanvas* canvas, const SkRect& bounds, const SkPaint& inPaint) SkPaint paint = inPaint; paint.setAlpha(mProperties.getRootAlpha() * 255); Bitmap& bitmap = getBitmapUpdateIfDirty(); SkBitmap skiaBitmap; bitmap.getSkBitmap(&skiaBitmap); sk_sp<SkImage> cachedBitmap = getBitmapUpdateIfDirty().makeImage(); int scaledWidth = SkScalarCeilToInt(mProperties.getScaledWidth()); int scaledHeight = SkScalarCeilToInt(mProperties.getScaledHeight()); canvas->drawBitmapRect(skiaBitmap, SkRect::MakeWH(scaledWidth, scaledHeight), bounds, canvas->drawImageRect(cachedBitmap, SkRect::MakeWH(scaledWidth, scaledHeight), bounds, &paint, SkCanvas::kFast_SrcRectConstraint); } Loading Loading
libs/hwui/VectorDrawable.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -505,13 +505,11 @@ void Tree::draw(SkCanvas* canvas, const SkRect& bounds, const SkPaint& inPaint) SkPaint paint = inPaint; paint.setAlpha(mProperties.getRootAlpha() * 255); Bitmap& bitmap = getBitmapUpdateIfDirty(); SkBitmap skiaBitmap; bitmap.getSkBitmap(&skiaBitmap); sk_sp<SkImage> cachedBitmap = getBitmapUpdateIfDirty().makeImage(); int scaledWidth = SkScalarCeilToInt(mProperties.getScaledWidth()); int scaledHeight = SkScalarCeilToInt(mProperties.getScaledHeight()); canvas->drawBitmapRect(skiaBitmap, SkRect::MakeWH(scaledWidth, scaledHeight), bounds, canvas->drawImageRect(cachedBitmap, SkRect::MakeWH(scaledWidth, scaledHeight), bounds, &paint, SkCanvas::kFast_SrcRectConstraint); } Loading