summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/rs/rsContext.cpp')
-rw-r--r--libs/rs/rsContext.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index decd9f1..6a30b17 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -333,6 +333,7 @@ Context::Context() {
mPaused = false;
mObjHead = NULL;
mError = RS_ERROR_NONE;
+ mTargetSdkVersion = 14;
mDPI = 96;
mIsContextLite = false;
}
@@ -678,19 +679,25 @@ void rsi_ContextDeinitToClient(Context *rsc) {
}
}
-RsContext rsContextCreate(RsDevice vdev, uint32_t version) {
+RsContext rsContextCreate(RsDevice vdev, uint32_t version,
+ uint32_t sdkVersion) {
LOGV("rsContextCreate %p", vdev);
Device * dev = static_cast<Device *>(vdev);
Context *rsc = Context::createContext(dev, NULL);
+ if (rsc) {
+ rsc->setTargetSdkVersion(sdkVersion);
+ }
return rsc;
}
RsContext rsContextCreateGL(RsDevice vdev, uint32_t version,
- RsSurfaceConfig sc, uint32_t dpi) {
+ uint32_t sdkVersion, RsSurfaceConfig sc,
+ uint32_t dpi) {
LOGV("rsContextCreateGL %p", vdev);
Device * dev = static_cast<Device *>(vdev);
Context *rsc = Context::createContext(dev, &sc);
if (rsc) {
+ rsc->setTargetSdkVersion(sdkVersion);
rsc->setDPI(dpi);
}
LOGV("rsContextCreateGL ret %p ", rsc);