diff options
| author | 2011-05-17 12:32:47 -0700 | |
|---|---|---|
| committer | 2011-05-17 16:42:24 -0700 | |
| commit | 6c72eec06e69559b4d990777c7b280aa81586797 (patch) | |
| tree | 7190db025c961273573e8faa05d1a3c22ec834ba /libs/rs/rsContext.cpp | |
| parent | 51c07e717b4416dd338b0add3a3c94d1137366af (diff) | |
Preparing libRS for for compilation on host.
Change-Id: I851add79831331c8a8b20dcccdb0817f8ad0c359
Diffstat (limited to 'libs/rs/rsContext.cpp')
| -rw-r--r-- | libs/rs/rsContext.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index a4e1b7296112..d3bd0d984b38 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -18,8 +18,6 @@ #include "rsContext.h" #include "rsThreadIO.h" #include <ui/FramebufferNativeWindow.h> -#include <ui/PixelFormat.h> -#include <ui/egl/android_natives.h> #include <sys/types.h> #include <sys/resource.h> @@ -246,7 +244,7 @@ void * Context::threadProc(void *vrsc) { while (!rsc->mExit) { mDraw |= rsc->mIO.playCoreCommands(rsc, !mDraw); mDraw &= (rsc->mRootScript.get() != NULL); - mDraw &= (rsc->mWndSurface != NULL); + mDraw &= rsc->mHasSurface; uint32_t targetTime = 0; if (mDraw && rsc->mIsGraphicsContext) { @@ -371,7 +369,7 @@ bool Context::initContext(Device *dev, const RsSurfaceConfig *sc) { return false; } - mWndSurface = NULL; + mHasSurface = false; timerInit(); timerSet(RS_TIMER_INTERNAL); @@ -406,7 +404,6 @@ Context::~Context() { mIO.shutdown(); int status = pthread_join(mThreadId, &res); - if (mHal.funcs.shutdownDriver) { mHal.funcs.shutdownDriver(this); } @@ -421,11 +418,11 @@ Context::~Context() { LOGV("Context::~Context done"); } -void Context::setSurface(uint32_t w, uint32_t h, ANativeWindow *sur) { +void Context::setSurface(uint32_t w, uint32_t h, RsNativeWindow sur) { rsAssert(mIsGraphicsContext); mHal.funcs.setSurface(this, w, h, sur); - mWndSurface = sur; + mHasSurface = sur != NULL; mWidth = w; mHeight = h; @@ -617,7 +614,7 @@ void rsi_ContextResume(Context *rsc) { rsc->resume(); } -void rsi_ContextSetSurface(Context *rsc, uint32_t w, uint32_t h, ANativeWindow *sur, size_t sur_length) { +void rsi_ContextSetSurface(Context *rsc, uint32_t w, uint32_t h, RsNativeWindow sur) { rsc->setSurface(w, h, sur); } |