Loading libs/hwui/Android.mk +5 −2 Original line number Diff line number Diff line Loading @@ -65,11 +65,14 @@ ifeq ($(USE_OPENGL_RENDERER),true) ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT)) LOCAL_CFLAGS += -DANDROID_ENABLE_RENDERSCRIPT LOCAL_SHARED_LIBRARIES += libRS libRScpp LOCAL_SHARED_LIBRARIES += libRS libRScpp libstlport LOCAL_C_INCLUDES += \ $(intermediates) \ frameworks/rs/cpp \ frameworks/rs frameworks/rs \ external/stlport/stlport \ bionic/ \ bionic/libstdc++/include endif ifndef HWUI_COMPILE_SYMBOLS Loading libs/hwui/FontRenderer.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -729,7 +729,7 @@ void FontRenderer::blurImage(uint8_t** image, int32_t width, int32_t height, int if (width * height * radius >= RS_MIN_INPUT_CUTOFF) { uint8_t* outImage = (uint8_t*) memalign(RS_CPU_ALLOCATION_ALIGNMENT, width * height); if (mRs.get() == 0) { if (mRs == 0) { mRs = new RSC::RS(); if (!mRs->init(true, true)) { ALOGE("blur RS failed to init"); Loading @@ -739,11 +739,13 @@ void FontRenderer::blurImage(uint8_t** image, int32_t width, int32_t height, int mRsScript = new RSC::ScriptIntrinsicBlur(mRs, mRsElement); } sp<const RSC::Type> t = RSC::Type::create(mRs, mRsElement, width, height, 0); sp<RSC::Allocation> ain = RSC::Allocation::createTyped(mRs, t, RS_ALLOCATION_MIPMAP_NONE, RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_SHARED, *image); sp<RSC::Allocation> aout = RSC::Allocation::createTyped(mRs, t, RS_ALLOCATION_MIPMAP_NONE, RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_SHARED, outImage); RSC::sp<const RSC::Type> t = RSC::Type::create(mRs, mRsElement, width, height, 0); RSC::sp<RSC::Allocation> ain = RSC::Allocation::createTyped(mRs, t, RS_ALLOCATION_MIPMAP_NONE, RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_SHARED, *image); RSC::sp<RSC::Allocation> aout = RSC::Allocation::createTyped(mRs, t, RS_ALLOCATION_MIPMAP_NONE, RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_SHARED, outImage); mRsScript->setRadius(radius); mRsScript->blur(ain, aout); Loading libs/hwui/FontRenderer.h +5 −3 Original line number Diff line number Diff line Loading @@ -35,10 +35,12 @@ #include "Properties.h" #ifdef ANDROID_ENABLE_RENDERSCRIPT #include "RenderScript.h" namespace RSC { class Element; class RS; class ScriptIntrinsicBlur; class sp; } #endif Loading Loading @@ -206,9 +208,9 @@ private: #ifdef ANDROID_ENABLE_RENDERSCRIPT // RS constructs sp<RSC::RS> mRs; sp<const RSC::Element> mRsElement; sp<RSC::ScriptIntrinsicBlur> mRsScript; 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); Loading Loading
libs/hwui/Android.mk +5 −2 Original line number Diff line number Diff line Loading @@ -65,11 +65,14 @@ ifeq ($(USE_OPENGL_RENDERER),true) ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT)) LOCAL_CFLAGS += -DANDROID_ENABLE_RENDERSCRIPT LOCAL_SHARED_LIBRARIES += libRS libRScpp LOCAL_SHARED_LIBRARIES += libRS libRScpp libstlport LOCAL_C_INCLUDES += \ $(intermediates) \ frameworks/rs/cpp \ frameworks/rs frameworks/rs \ external/stlport/stlport \ bionic/ \ bionic/libstdc++/include endif ifndef HWUI_COMPILE_SYMBOLS Loading
libs/hwui/FontRenderer.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -729,7 +729,7 @@ void FontRenderer::blurImage(uint8_t** image, int32_t width, int32_t height, int if (width * height * radius >= RS_MIN_INPUT_CUTOFF) { uint8_t* outImage = (uint8_t*) memalign(RS_CPU_ALLOCATION_ALIGNMENT, width * height); if (mRs.get() == 0) { if (mRs == 0) { mRs = new RSC::RS(); if (!mRs->init(true, true)) { ALOGE("blur RS failed to init"); Loading @@ -739,11 +739,13 @@ void FontRenderer::blurImage(uint8_t** image, int32_t width, int32_t height, int mRsScript = new RSC::ScriptIntrinsicBlur(mRs, mRsElement); } sp<const RSC::Type> t = RSC::Type::create(mRs, mRsElement, width, height, 0); sp<RSC::Allocation> ain = RSC::Allocation::createTyped(mRs, t, RS_ALLOCATION_MIPMAP_NONE, RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_SHARED, *image); sp<RSC::Allocation> aout = RSC::Allocation::createTyped(mRs, t, RS_ALLOCATION_MIPMAP_NONE, RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_SHARED, outImage); RSC::sp<const RSC::Type> t = RSC::Type::create(mRs, mRsElement, width, height, 0); RSC::sp<RSC::Allocation> ain = RSC::Allocation::createTyped(mRs, t, RS_ALLOCATION_MIPMAP_NONE, RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_SHARED, *image); RSC::sp<RSC::Allocation> aout = RSC::Allocation::createTyped(mRs, t, RS_ALLOCATION_MIPMAP_NONE, RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_SHARED, outImage); mRsScript->setRadius(radius); mRsScript->blur(ain, aout); Loading
libs/hwui/FontRenderer.h +5 −3 Original line number Diff line number Diff line Loading @@ -35,10 +35,12 @@ #include "Properties.h" #ifdef ANDROID_ENABLE_RENDERSCRIPT #include "RenderScript.h" namespace RSC { class Element; class RS; class ScriptIntrinsicBlur; class sp; } #endif Loading Loading @@ -206,9 +208,9 @@ private: #ifdef ANDROID_ENABLE_RENDERSCRIPT // RS constructs sp<RSC::RS> mRs; sp<const RSC::Element> mRsElement; sp<RSC::ScriptIntrinsicBlur> mRsScript; 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); Loading