Loading libs/rs/java/RenderScript/android/renderscript/RSSurfaceView.java +11 −11 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback public RSSurfaceView(Context context) { super(context); init(); Log.v("***", "RSSurfaceView"); Log.v(RenderScript.LOG_TAG, "RSSurfaceView"); } /** Loading @@ -50,7 +50,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback public RSSurfaceView(Context context, AttributeSet attrs) { super(context, attrs); init(); Log.v("***", "RSSurfaceView"); Log.v(RenderScript.LOG_TAG, "RSSurfaceView"); } private void init() { Loading @@ -66,7 +66,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback * not normally called or subclassed by clients of RSSurfaceView. */ public void surfaceCreated(SurfaceHolder holder) { Log.v("***", "surfaceCreated"); Log.v(RenderScript.LOG_TAG, "surfaceCreated"); mSurfaceHolder = holder; //mGLThread.surfaceCreated(); } Loading @@ -77,7 +77,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback */ public void surfaceDestroyed(SurfaceHolder holder) { // Surface will be destroyed when we return Log.v("***", "surfaceDestroyed"); Log.v(RenderScript.LOG_TAG, "surfaceDestroyed"); //mGLThread.surfaceDestroyed(); } Loading @@ -86,7 +86,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback * not normally called or subclassed by clients of RSSurfaceView. */ public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { Log.v("***", "surfaceChanged"); Log.v(RenderScript.LOG_TAG, "surfaceChanged"); //mGLThread.onWindowResize(w, h); } Loading @@ -98,7 +98,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback * Must not be called before a renderer has been set. */ public void onPause() { Log.v("***", "onPause"); Log.v(RenderScript.LOG_TAG, "onPause"); //mGLThread.onPause(); } Loading @@ -110,7 +110,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback * Must not be called before a renderer has been set. */ public void onResume() { Log.v("***", "onResume"); Log.v(RenderScript.LOG_TAG, "onResume"); //mGLThread.onResume(); } Loading @@ -121,7 +121,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback * @param r the runnable to be run on the GL rendering thread. */ public void queueEvent(Runnable r) { Log.v("***", "queueEvent"); Log.v(RenderScript.LOG_TAG, "queueEvent"); //mGLThread.queueEvent(r); } Loading @@ -139,14 +139,14 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback // ---------------------------------------------------------------------- public RenderScript createRenderScript() { Log.v("***", "createRenderScript 1"); Log.v(RenderScript.LOG_TAG, "createRenderScript 1"); Surface sur = null; while ((sur == null) || (mSurfaceHolder == null)) { sur = getHolder().getSurface(); } Log.v("***", "createRenderScript 2"); Log.v(RenderScript.LOG_TAG, "createRenderScript 2"); RenderScript rs = new RenderScript(sur); Log.v("***", "createRenderScript 3 rs"); Log.v(RenderScript.LOG_TAG, "createRenderScript 3 rs"); return rs; } Loading libs/rs/java/RenderScript/android/renderscript/RenderScript.java +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ import android.graphics.Bitmap; import android.graphics.Color; public class RenderScript { private static final String LOG_TAG = "libRS_jni"; static final String LOG_TAG = "libRS_jni"; private static final boolean DEBUG = false; private static final boolean LOG_ENABLED = DEBUG ? Config.LOGD : Config.LOGV; Loading libs/rs/jni/RenderScript_jni.cpp +3 −4 Original line number Diff line number Diff line Loading @@ -14,12 +14,13 @@ * limitations under the License. */ #define LOG_TAG "libRS_jni" #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <math.h> #include <utils/misc.h> #include <ui/EGLNativeWindowSurface.h> Loading @@ -27,6 +28,7 @@ #include <core/SkBitmap.h> #include "jni.h" #include "JNIHelp.h" #include "android_runtime/AndroidRuntime.h" Loading Loading @@ -107,7 +109,6 @@ nContextCreate(JNIEnv *_env, jobject _this, jint dev, jobject wnd, jint ver) if (window == NULL) goto not_valid_surface; LOGE("nContextCreate 5"); return (jint)rsContextCreate((RsDevice)dev, window, ver); } Loading Loading @@ -1068,8 +1069,6 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) JNIEnv* env = NULL; jint result = -1; LOGE("****************************************************\n"); if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) { LOGE("ERROR: GetEnv failed\n"); goto bail; Loading libs/rs/rsAllocation.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ Allocation::Allocation(const Type *type) Allocation::~Allocation() { LOGE("Allocation %p destryed", this); } void Allocation::setCpuWritable(bool) Loading Loading @@ -79,8 +78,6 @@ void Allocation::uploadToTexture(uint32_t lodOffset) //rsAssert(!mTextureId); rsAssert(lodOffset < mType->getLODCount()); //LOGE("uploadToTexture %i, lod %i", mTextureID, lodOffset); GLenum type = mType->getElement()->getGLType(); GLenum format = mType->getElement()->getGLFormat(); Loading Loading @@ -109,8 +106,6 @@ void Allocation::uploadToBufferObject() rsAssert(!mType->getDimY()); rsAssert(!mType->getDimZ()); //LOGE("uploadToTexture %i, lod %i", mTextureID, lodOffset); if (!mBufferID) { glGenBuffers(1, &mBufferID); } Loading libs/rs/rsContext.cpp +3 −8 Original line number Diff line number Diff line Loading @@ -119,9 +119,6 @@ void * Context::threadProc(void *vrsc) Context *rsc = static_cast<Context *>(vrsc); gIO = new ThreadIO(); rsc->mServerCommands.init(128); rsc->mServerReturns.init(128); rsc->initEGL(); ScriptTLSStruct *tlsStruct = new ScriptTLSStruct; Loading Loading @@ -169,9 +166,6 @@ Context::Context(Device *dev, Surface *sur) mRunning = false; mExit = false; mServerCommands.init(256); mServerReturns.init(256); // see comment in header gCon = this; Loading @@ -194,13 +188,14 @@ Context::Context(Device *dev, Surface *sur) sparam.sched_priority = ANDROID_PRIORITY_DISPLAY; pthread_attr_setschedparam(&threadAttr, &sparam); LOGE("RS Launching thread"); mWndSurface = sur; LOGV("RS Launching thread"); status = pthread_create(&mThreadId, &threadAttr, threadProc, this); if (status) { LOGE("Failed to start rs context thread."); } mWndSurface = sur; while(!mRunning) { sleep(1); } Loading Loading
libs/rs/java/RenderScript/android/renderscript/RSSurfaceView.java +11 −11 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback public RSSurfaceView(Context context) { super(context); init(); Log.v("***", "RSSurfaceView"); Log.v(RenderScript.LOG_TAG, "RSSurfaceView"); } /** Loading @@ -50,7 +50,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback public RSSurfaceView(Context context, AttributeSet attrs) { super(context, attrs); init(); Log.v("***", "RSSurfaceView"); Log.v(RenderScript.LOG_TAG, "RSSurfaceView"); } private void init() { Loading @@ -66,7 +66,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback * not normally called or subclassed by clients of RSSurfaceView. */ public void surfaceCreated(SurfaceHolder holder) { Log.v("***", "surfaceCreated"); Log.v(RenderScript.LOG_TAG, "surfaceCreated"); mSurfaceHolder = holder; //mGLThread.surfaceCreated(); } Loading @@ -77,7 +77,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback */ public void surfaceDestroyed(SurfaceHolder holder) { // Surface will be destroyed when we return Log.v("***", "surfaceDestroyed"); Log.v(RenderScript.LOG_TAG, "surfaceDestroyed"); //mGLThread.surfaceDestroyed(); } Loading @@ -86,7 +86,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback * not normally called or subclassed by clients of RSSurfaceView. */ public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { Log.v("***", "surfaceChanged"); Log.v(RenderScript.LOG_TAG, "surfaceChanged"); //mGLThread.onWindowResize(w, h); } Loading @@ -98,7 +98,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback * Must not be called before a renderer has been set. */ public void onPause() { Log.v("***", "onPause"); Log.v(RenderScript.LOG_TAG, "onPause"); //mGLThread.onPause(); } Loading @@ -110,7 +110,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback * Must not be called before a renderer has been set. */ public void onResume() { Log.v("***", "onResume"); Log.v(RenderScript.LOG_TAG, "onResume"); //mGLThread.onResume(); } Loading @@ -121,7 +121,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback * @param r the runnable to be run on the GL rendering thread. */ public void queueEvent(Runnable r) { Log.v("***", "queueEvent"); Log.v(RenderScript.LOG_TAG, "queueEvent"); //mGLThread.queueEvent(r); } Loading @@ -139,14 +139,14 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback // ---------------------------------------------------------------------- public RenderScript createRenderScript() { Log.v("***", "createRenderScript 1"); Log.v(RenderScript.LOG_TAG, "createRenderScript 1"); Surface sur = null; while ((sur == null) || (mSurfaceHolder == null)) { sur = getHolder().getSurface(); } Log.v("***", "createRenderScript 2"); Log.v(RenderScript.LOG_TAG, "createRenderScript 2"); RenderScript rs = new RenderScript(sur); Log.v("***", "createRenderScript 3 rs"); Log.v(RenderScript.LOG_TAG, "createRenderScript 3 rs"); return rs; } Loading
libs/rs/java/RenderScript/android/renderscript/RenderScript.java +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ import android.graphics.Bitmap; import android.graphics.Color; public class RenderScript { private static final String LOG_TAG = "libRS_jni"; static final String LOG_TAG = "libRS_jni"; private static final boolean DEBUG = false; private static final boolean LOG_ENABLED = DEBUG ? Config.LOGD : Config.LOGV; Loading
libs/rs/jni/RenderScript_jni.cpp +3 −4 Original line number Diff line number Diff line Loading @@ -14,12 +14,13 @@ * limitations under the License. */ #define LOG_TAG "libRS_jni" #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <math.h> #include <utils/misc.h> #include <ui/EGLNativeWindowSurface.h> Loading @@ -27,6 +28,7 @@ #include <core/SkBitmap.h> #include "jni.h" #include "JNIHelp.h" #include "android_runtime/AndroidRuntime.h" Loading Loading @@ -107,7 +109,6 @@ nContextCreate(JNIEnv *_env, jobject _this, jint dev, jobject wnd, jint ver) if (window == NULL) goto not_valid_surface; LOGE("nContextCreate 5"); return (jint)rsContextCreate((RsDevice)dev, window, ver); } Loading Loading @@ -1068,8 +1069,6 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) JNIEnv* env = NULL; jint result = -1; LOGE("****************************************************\n"); if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) { LOGE("ERROR: GetEnv failed\n"); goto bail; Loading
libs/rs/rsAllocation.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ Allocation::Allocation(const Type *type) Allocation::~Allocation() { LOGE("Allocation %p destryed", this); } void Allocation::setCpuWritable(bool) Loading Loading @@ -79,8 +78,6 @@ void Allocation::uploadToTexture(uint32_t lodOffset) //rsAssert(!mTextureId); rsAssert(lodOffset < mType->getLODCount()); //LOGE("uploadToTexture %i, lod %i", mTextureID, lodOffset); GLenum type = mType->getElement()->getGLType(); GLenum format = mType->getElement()->getGLFormat(); Loading Loading @@ -109,8 +106,6 @@ void Allocation::uploadToBufferObject() rsAssert(!mType->getDimY()); rsAssert(!mType->getDimZ()); //LOGE("uploadToTexture %i, lod %i", mTextureID, lodOffset); if (!mBufferID) { glGenBuffers(1, &mBufferID); } Loading
libs/rs/rsContext.cpp +3 −8 Original line number Diff line number Diff line Loading @@ -119,9 +119,6 @@ void * Context::threadProc(void *vrsc) Context *rsc = static_cast<Context *>(vrsc); gIO = new ThreadIO(); rsc->mServerCommands.init(128); rsc->mServerReturns.init(128); rsc->initEGL(); ScriptTLSStruct *tlsStruct = new ScriptTLSStruct; Loading Loading @@ -169,9 +166,6 @@ Context::Context(Device *dev, Surface *sur) mRunning = false; mExit = false; mServerCommands.init(256); mServerReturns.init(256); // see comment in header gCon = this; Loading @@ -194,13 +188,14 @@ Context::Context(Device *dev, Surface *sur) sparam.sched_priority = ANDROID_PRIORITY_DISPLAY; pthread_attr_setschedparam(&threadAttr, &sparam); LOGE("RS Launching thread"); mWndSurface = sur; LOGV("RS Launching thread"); status = pthread_create(&mThreadId, &threadAttr, threadProc, this); if (status) { LOGE("Failed to start rs context thread."); } mWndSurface = sur; while(!mRunning) { sleep(1); } Loading