Loading core/jni/Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,8 @@ LOCAL_C_INCLUDES += \ $(call include-path-for, libhardware)/hardware \ $(call include-path-for, libhardware_legacy)/hardware_legacy \ $(TOP)/frameworks/base/media/jni \ $(TOP)/frameworks/rs/cpp \ $(TOP)/frameworks/rs \ $(TOP)/system/core/base/include \ $(TOP)/system/core/include \ $(TOP)/system/core/libappfuse/include \ Loading libs/hwui/Android.mk +5 −7 Original line number Diff line number Diff line Loading @@ -189,13 +189,11 @@ hwui_c_includes += \ external/harfbuzz_ng/src \ external/freetype/include ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT)) hwui_cflags += -DANDROID_ENABLE_RENDERSCRIPT # enable RENDERSCRIPT hwui_c_includes += \ $(call intermediates-dir-for,STATIC_LIBRARIES,TARGET,) \ frameworks/rs/cpp \ frameworks/rs endif # ------------------------ # static library Loading libs/hwui/FontRenderer.cpp +1 −11 Original line number Diff line number Diff line Loading @@ -33,14 +33,11 @@ #include <algorithm> #include <cutils/properties.h> #include <RenderScript.h> #include <SkGlyph.h> #include <SkUtils.h> #include <utils/Log.h> #ifdef ANDROID_ENABLE_RENDERSCRIPT #include <RenderScript.h> #endif namespace android { namespace uirenderer { Loading Loading @@ -591,17 +588,12 @@ FontRenderer::DropShadow FontRenderer::renderDropShadow(const SkPaint* paint, co return image; } #ifdef ANDROID_ENABLE_RENDERSCRIPT // Align buffers for renderscript usage if (paddedWidth & (RS_CPU_ALLOCATION_ALIGNMENT - 1)) { paddedWidth += RS_CPU_ALLOCATION_ALIGNMENT - paddedWidth % RS_CPU_ALLOCATION_ALIGNMENT; } int size = paddedWidth * paddedHeight; uint8_t* dataBuffer = (uint8_t*) memalign(RS_CPU_ALLOCATION_ALIGNMENT, size); #else int size = paddedWidth * paddedHeight; uint8_t* dataBuffer = (uint8_t*) malloc(size); #endif memset(dataBuffer, 0, size); Loading Loading @@ -691,7 +683,6 @@ bool FontRenderer::renderTextOnPath(const SkPaint* paint, const Rect* clip, cons void FontRenderer::blurImage(uint8_t** image, int32_t width, int32_t height, float radius) { uint32_t intRadius = Blur::convertRadiusToInt(radius); #ifdef ANDROID_ENABLE_RENDERSCRIPT if (width * height * intRadius >= RS_MIN_INPUT_CUTOFF && radius <= 25.0f) { uint8_t* outImage = (uint8_t*) memalign(RS_CPU_ALLOCATION_ALIGNMENT, width * height); Loading Loading @@ -729,7 +720,6 @@ void FontRenderer::blurImage(uint8_t** image, int32_t width, int32_t height, flo return; } } #endif std::unique_ptr<float[]> gaussian(new float[2 * intRadius + 1]); Blur::generateGaussianWeights(gaussian.get(), radius); Loading libs/hwui/FontRenderer.h +0 −4 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ #include <vector> #ifdef ANDROID_ENABLE_RENDERSCRIPT #include "RenderScript.h" namespace RSC { class Element; Loading @@ -42,7 +41,6 @@ namespace RSC { class ScriptIntrinsicBlur; class sp; } #endif namespace android { namespace uirenderer { Loading Loading @@ -201,12 +199,10 @@ private: FontCacheHistoryTracker mHistoryTracker; #endif #ifdef ANDROID_ENABLE_RENDERSCRIPT // RS constructs RSC::sp<RSC::RS> mRs; RSC::sp<const RSC::Element> mRsElement; RSC::sp<RSC::ScriptIntrinsicBlur> mRsScript; #endif static void computeGaussianWeights(float* weights, int32_t radius); static void horizontalBlur(float* weights, int32_t radius, const uint8_t *source, uint8_t *dest, Loading libs/hwui/hwui_static_deps.mk +2 −3 Original line number Diff line number Diff line Loading @@ -28,6 +28,5 @@ LOCAL_SHARED_LIBRARIES += \ libminikin \ libandroidfw ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT)) # enable RENDERSCRIPT LOCAL_SHARED_LIBRARIES += libRScpp endif Loading
core/jni/Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,8 @@ LOCAL_C_INCLUDES += \ $(call include-path-for, libhardware)/hardware \ $(call include-path-for, libhardware_legacy)/hardware_legacy \ $(TOP)/frameworks/base/media/jni \ $(TOP)/frameworks/rs/cpp \ $(TOP)/frameworks/rs \ $(TOP)/system/core/base/include \ $(TOP)/system/core/include \ $(TOP)/system/core/libappfuse/include \ Loading
libs/hwui/Android.mk +5 −7 Original line number Diff line number Diff line Loading @@ -189,13 +189,11 @@ hwui_c_includes += \ external/harfbuzz_ng/src \ external/freetype/include ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT)) hwui_cflags += -DANDROID_ENABLE_RENDERSCRIPT # enable RENDERSCRIPT hwui_c_includes += \ $(call intermediates-dir-for,STATIC_LIBRARIES,TARGET,) \ frameworks/rs/cpp \ frameworks/rs endif # ------------------------ # static library Loading
libs/hwui/FontRenderer.cpp +1 −11 Original line number Diff line number Diff line Loading @@ -33,14 +33,11 @@ #include <algorithm> #include <cutils/properties.h> #include <RenderScript.h> #include <SkGlyph.h> #include <SkUtils.h> #include <utils/Log.h> #ifdef ANDROID_ENABLE_RENDERSCRIPT #include <RenderScript.h> #endif namespace android { namespace uirenderer { Loading Loading @@ -591,17 +588,12 @@ FontRenderer::DropShadow FontRenderer::renderDropShadow(const SkPaint* paint, co return image; } #ifdef ANDROID_ENABLE_RENDERSCRIPT // Align buffers for renderscript usage if (paddedWidth & (RS_CPU_ALLOCATION_ALIGNMENT - 1)) { paddedWidth += RS_CPU_ALLOCATION_ALIGNMENT - paddedWidth % RS_CPU_ALLOCATION_ALIGNMENT; } int size = paddedWidth * paddedHeight; uint8_t* dataBuffer = (uint8_t*) memalign(RS_CPU_ALLOCATION_ALIGNMENT, size); #else int size = paddedWidth * paddedHeight; uint8_t* dataBuffer = (uint8_t*) malloc(size); #endif memset(dataBuffer, 0, size); Loading Loading @@ -691,7 +683,6 @@ bool FontRenderer::renderTextOnPath(const SkPaint* paint, const Rect* clip, cons void FontRenderer::blurImage(uint8_t** image, int32_t width, int32_t height, float radius) { uint32_t intRadius = Blur::convertRadiusToInt(radius); #ifdef ANDROID_ENABLE_RENDERSCRIPT if (width * height * intRadius >= RS_MIN_INPUT_CUTOFF && radius <= 25.0f) { uint8_t* outImage = (uint8_t*) memalign(RS_CPU_ALLOCATION_ALIGNMENT, width * height); Loading Loading @@ -729,7 +720,6 @@ void FontRenderer::blurImage(uint8_t** image, int32_t width, int32_t height, flo return; } } #endif std::unique_ptr<float[]> gaussian(new float[2 * intRadius + 1]); Blur::generateGaussianWeights(gaussian.get(), radius); Loading
libs/hwui/FontRenderer.h +0 −4 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ #include <vector> #ifdef ANDROID_ENABLE_RENDERSCRIPT #include "RenderScript.h" namespace RSC { class Element; Loading @@ -42,7 +41,6 @@ namespace RSC { class ScriptIntrinsicBlur; class sp; } #endif namespace android { namespace uirenderer { Loading Loading @@ -201,12 +199,10 @@ private: FontCacheHistoryTracker mHistoryTracker; #endif #ifdef ANDROID_ENABLE_RENDERSCRIPT // RS constructs RSC::sp<RSC::RS> mRs; RSC::sp<const RSC::Element> mRsElement; RSC::sp<RSC::ScriptIntrinsicBlur> mRsScript; #endif static void computeGaussianWeights(float* weights, int32_t radius); static void horizontalBlur(float* weights, int32_t radius, const uint8_t *source, uint8_t *dest, Loading
libs/hwui/hwui_static_deps.mk +2 −3 Original line number Diff line number Diff line Loading @@ -28,6 +28,5 @@ LOCAL_SHARED_LIBRARIES += \ libminikin \ libandroidfw ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT)) # enable RENDERSCRIPT LOCAL_SHARED_LIBRARIES += libRScpp endif