aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/SkBlitter_ARGB32.cpp
diff options
context:
space:
mode:
authorDaniel Hillenbrand <codeworkx@cyanogenmod.org>2013-06-14 16:04:55 +0200
committerDaniel Hillenbrand <codeworkx@cyanogenmod.org>2013-06-14 16:40:44 +0200
commit647876b665f2cf011e75adc6ff2238d467c47635 (patch)
tree6c825383206fba6fc0ef3c7b3d8b18112dff488b /src/core/SkBlitter_ARGB32.cpp
parent506e364aaa1689ca5b8edc68178c0a134dd16781 (diff)
downloadexternal_skia-647876b665f2cf011e75adc6ff2238d467c47635.zip
external_skia-647876b665f2cf011e75adc6ff2238d467c47635.tar.gz
external_skia-647876b665f2cf011e75adc6ff2238d467c47635.tar.bz2
exynos4: fimg2d acceleration
http://git.insignal.co.kr/insignal/origen_quad-jb_mr1.1/android/platform/external/skia/commit/?h=origen_quad-jb_mr1.1&id=7a2cdab99f7a27e2566afbf8c0a2d3ea64c8a375 Change-Id: If605106881540f2170249e6446770ec95b4667b3
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