summaryrefslogtreecommitdiff
path: root/libs/hwui/VectorDrawable.cpp
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2019-07-25 12:28:29 -0400
committerMike Reed <reed@google.com>2019-07-29 13:38:35 -0400
commitc2dbc03acc61e3d4303afbbc63c8e7144f617846 (patch)
tree2f1f794729a307af6ecefb7586148a09d9ad33a9 /libs/hwui/VectorDrawable.cpp
parent0cce030acf2e180dcf205ccf236854d0d4a59fbc (diff)
pass Paint not SkPaint to Canvas
Test: cts Change-Id: I9a3314bc3f221b6e884c8c84d7b0241f7c5be600
Diffstat (limited to 'libs/hwui/VectorDrawable.cpp')
-rw-r--r--libs/hwui/VectorDrawable.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/libs/hwui/VectorDrawable.cpp b/libs/hwui/VectorDrawable.cpp
index 89ad1b99c6b6..f91d178f01f3 100644
--- a/libs/hwui/VectorDrawable.cpp
+++ b/libs/hwui/VectorDrawable.cpp
@@ -17,6 +17,7 @@
#include "VectorDrawable.h"
#include <utils/Log.h>
+#include "hwui/Paint.h"
#include "PathParser.h"
#include "SkColorFilter.h"
#include "SkImageInfo.h"
@@ -458,8 +459,12 @@ void Tree::drawStaging(Canvas* outCanvas) {
mStagingCache.dirty = false;
}
- SkPaint paint;
- getPaintFor(&paint, mStagingProperties);
+ SkPaint skp;
+ getPaintFor(&skp, mStagingProperties);
+ Paint paint;
+ paint.setFilterQuality(skp.getFilterQuality());
+ paint.setColorFilter(skp.refColorFilter());
+ paint.setAlpha(skp.getAlpha());
outCanvas->drawBitmap(*mStagingCache.bitmap, 0, 0, mStagingCache.bitmap->width(),
mStagingCache.bitmap->height(), mStagingProperties.getBounds().left(),
mStagingProperties.getBounds().top(),