aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/SkDraw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkDraw.cpp')
-rw-r--r--src/core/SkDraw.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 4460eb8..e3ee31c 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -34,7 +34,11 @@
#include <cutils/log.h>
#if defined(FIMG2D_ENABLED)
+#if defined(FIMG2D3X)
+#include "SkFimgApi3x.h"
+#elif defined(FIMG2D4X)
#include "SkFimgApi4x.h"
+#endif
Fimg fimg;
SkMutex gG2DMutex;
#endif
@@ -1261,7 +1265,10 @@ void SkDraw::drawBitmap(const SkBitmap& bitmap, const SkMatrix& prematrix,
fimg.clipL = cr.fLeft;
fimg.clipR = cr.fRight;
+#if defined(FIMG2D4X)
fimg.mskAddr = NULL;
+#endif
+
fimg.rotate = 0;
SkXfermode::Mode mode;
@@ -1272,8 +1279,13 @@ void SkDraw::drawBitmap(const SkBitmap& bitmap, const SkMatrix& prematrix,
fimg.colorFilter = (int)paint.getColorFilter();
fimg.alpha = paint.getAlpha();
- if (bitmap.isOpaque() && (255 == fimg.alpha))
+ if (bitmap.isOpaque() && (255 == fimg.alpha)) {
+#if defined(FIMG2D3X)
+ fimg.alpha = 256;
+#elif defined(FIMG2D4X)
fimg.alpha = 255;
+#endif
+ }
if (fimg.srcAddr != NULL) {
int retFimg = FimgApiStretch(&fimg, __func__);
@@ -1343,7 +1355,10 @@ void SkDraw::drawBitmap(const SkBitmap& bitmap, const SkMatrix& prematrix,
fimg.dstColorFormat = fBitmap->config();
fimg.dstAddr = (unsigned char *)fBitmap->getAddr(0,0);
+#if defined(FIMG2D4X)
fimg.mskAddr = NULL;
+#endif
+
fimg.rotate = 0;
fimg.alpha = paint.getAlpha();