aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/SkBlitter_ARGB32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkBlitter_ARGB32.cpp')
-rw-r--r--src/core/SkBlitter_ARGB32.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp
index 24ab330..44d0d8c 100644
--- a/src/core/SkBlitter_ARGB32.cpp
+++ b/src/core/SkBlitter_ARGB32.cpp
@@ -12,6 +12,17 @@
#include "SkXfermode.h"
#include "SkBlitMask.h"
+#define LOG_TAG "SKIA"
+#include <utils/Log.h>
+
+#if defined(FIMG2D_ENABLED)
+#include "SkBitmap.h"
+#include "SkBitmapProcShader.h"
+#include "SkFimgApi4x.h"
+extern Fimg fimg;
+extern SkMutex gG2DMutex;
+#endif
+
///////////////////////////////////////////////////////////////////////////////
static void SkARGB32_Blit32(const SkBitmap& device, const SkMask& mask,
@@ -213,10 +224,24 @@ void SkARGB32_Blitter::blitRect(int x, int y, int width, int height) {
uint32_t color = fPMColor;
size_t rowBytes = fDevice.rowBytes();
+#if defined(FIMG2D_ENABLED)
+ gG2DMutex.acquire();
+ int retFimg = FimgARGB32_Rect(fimg, fDevice.getAddr32(0, 0),
+ x, y, width, height, rowBytes, color);
+ if (retFimg != FIMGAPI_FINISHED) {
+ while (--height >= 0) {
+ fColor32Proc(device, device, width, color);
+ device = (uint32_t*)((char*)device + rowBytes);
+ }
+ }
+
+ gG2DMutex.release();
+#else
while (--height >= 0) {
fColor32Proc(device, device, width, color);
device = (uint32_t*)((char*)device + rowBytes);
}
+#endif
}
#if defined _WIN32 && _MSC_VER >= 1300