Add support for debug and profile context.

Change-Id: If67bc23b457d50ced7bfa5ac21a63d14de8193b9
diff --git a/cpp/RenderScript.cpp b/cpp/RenderScript.cpp
index 98ab380..886e1d4 100644
--- a/cpp/RenderScript.cpp
+++ b/cpp/RenderScript.cpp
@@ -65,7 +65,7 @@
         return false;
     }
 
-    mContext = rsContextCreate(mDev, 0, targetApi, forceCpu, synchronous);
+    mContext = rsContextCreate(mDev, 0, targetApi, RS_CONTEXT_TYPE_NORMAL, forceCpu, synchronous);
     if (mContext == 0) {
         ALOGE("Context creation failed");
         return false;
diff --git a/rs.h b/rs.h
index afe5534..7f592f7 100644
--- a/rs.h
+++ b/rs.h
@@ -51,8 +51,8 @@
 RsDevice rsDeviceCreate();
 void rsDeviceDestroy(RsDevice dev);
 void rsDeviceSetConfig(RsDevice dev, RsDeviceParam p, int32_t value);
-RsContext rsContextCreate(RsDevice dev, uint32_t version, uint32_t sdkVersion);
-RsContext rsContextCreate(RsDevice dev, uint32_t version, uint32_t sdkVersion, bool forceCpu, bool synchronous);
+RsContext rsContextCreate(RsDevice dev, uint32_t version, uint32_t sdkVersion,
+                          RsContextType ct, bool forceCpu, bool synchronous);
 RsContext rsContextCreateGL(RsDevice dev, uint32_t version, uint32_t sdkVersion,
                             RsSurfaceConfig sc, uint32_t dpi);
 
diff --git a/rsContext.cpp b/rsContext.cpp
index 6d70308..c227847 100644
--- a/rsContext.cpp
+++ b/rsContext.cpp
@@ -866,14 +866,8 @@
 }
 }
 
-RsContext rsContextCreate(RsDevice vdev, uint32_t version,
-                          uint32_t sdkVersion) {
-    return rsContextCreate(vdev, version, sdkVersion, false, false);
-}
-
-RsContext rsContextCreate(RsDevice vdev, uint32_t version,
-                          uint32_t sdkVersion, bool forceCpu,
-                          bool synchronous) {
+RsContext rsContextCreate(RsDevice vdev, uint32_t version, uint32_t sdkVersion,
+                          RsContextType ct, bool forceCpu, bool synchronous) {
     ALOGV("rsContextCreate dev=%p", vdev);
     Device * dev = static_cast<Device *>(vdev);
     Context *rsc = Context::createContext(dev, NULL, forceCpu, synchronous);
diff --git a/rsDefines.h b/rsDefines.h
index 413f1ba..52f7d83 100644
--- a/rsDefines.h
+++ b/rsDefines.h
@@ -76,6 +76,12 @@
     RS_DEVICE_PARAM_COUNT
 };
 
+enum RsContextType {
+    RS_CONTEXT_TYPE_NORMAL,
+    RS_CONTEXT_TYPE_DEBUG,
+    RS_CONTEXT_TYPE_PROFILE
+};
+
 typedef struct {
     uint32_t colorMin;
     uint32_t colorPref;