summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2011-10-18 11:08:31 -0700
committerAlex Sakhartchouk <alexst@google.com>2011-10-18 11:08:31 -0700
commit7d5f5e7c8943e043a422ad51c85d4e1684c37e28 (patch)
treeeee61debd73ac054eb1e95259e6e8e16c426df5a /libs
parenta744ead977b2beda89091abf295bcda860bf88b2 (diff)
downloadframeworks_base-7d5f5e7c8943e043a422ad51c85d4e1684c37e28.zip
frameworks_base-7d5f5e7c8943e043a422ad51c85d4e1684c37e28.tar.gz
frameworks_base-7d5f5e7c8943e043a422ad51c85d4e1684c37e28.tar.bz2
adding getters to Sampler ProgramRaster, ProgramStore, Element.
Element adds ability to get subelement info. Tests for new stuff. Change-Id: I4a77b91e4e0e73c95ab28b42c50732a64e71e7b9
Diffstat (limited to 'libs')
-rw-r--r--libs/rs/RenderScript.h12
-rw-r--r--libs/rs/rsElement.cpp3
2 files changed, 10 insertions, 5 deletions
diff --git a/libs/rs/RenderScript.h b/libs/rs/RenderScript.h
index 3ba0123..6d54268 100644
--- a/libs/rs/RenderScript.h
+++ b/libs/rs/RenderScript.h
@@ -34,26 +34,30 @@ RsFile rsaFileA3DCreateFromMemory(RsContext, const void *data, uint32_t len);
RsFile rsaFileA3DCreateFromAsset(RsContext, void *asset);
RsFile rsaFileA3DCreateFromFile(RsContext, const char *path);
void rsaFileA3DGetNumIndexEntries(RsContext, int32_t *numEntries, RsFile);
-void rsaFileA3DGetIndexEntries(RsContext, RsFileIndexEntry *fileEntries,uint32_t numEntries, RsFile);
+void rsaFileA3DGetIndexEntries(RsContext, RsFileIndexEntry *fileEntries,
+ uint32_t numEntries, RsFile);
void rsaGetName(RsContext, void * obj, const char **name);
// Mesh update functions
void rsaMeshGetVertexBufferCount(RsContext, RsMesh, int32_t *vtxCount);
void rsaMeshGetIndexCount(RsContext, RsMesh, int32_t *idxCount);
void rsaMeshGetVertices(RsContext, RsMesh, RsAllocation *vtxData, uint32_t vtxDataCount);
-void rsaMeshGetIndices(RsContext, RsMesh, RsAllocation *va, uint32_t *primType, uint32_t idxDataCount);
+void rsaMeshGetIndices(RsContext, RsMesh, RsAllocation *va,
+ uint32_t *primType, uint32_t idxDataCount);
// Allocation update
const void* rsaAllocationGetType(RsContext con, RsAllocation va);
// Type update
void rsaTypeGetNativeData(RsContext, RsType, uint32_t *typeData, uint32_t typeDataSize);
// Element update
void rsaElementGetNativeData(RsContext, RsElement, uint32_t *elemData, uint32_t elemDataSize);
-void rsaElementGetSubElements(RsContext, RsElement, uint32_t *ids, const char **names, uint32_t dataSize);
+void rsaElementGetSubElements(RsContext, RsElement, uint32_t *ids, const char **names,
+ uint32_t *arraySizes, uint32_t dataSize);
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 rsContextCreateGL(RsDevice dev, uint32_t version, uint32_t sdkVersion, RsSurfaceConfig sc, uint32_t dpi);
+RsContext rsContextCreateGL(RsDevice dev, uint32_t version, uint32_t sdkVersion,
+ RsSurfaceConfig sc, uint32_t dpi);
#include "rsgApiFuncDecl.h"
diff --git a/libs/rs/rsElement.cpp b/libs/rs/rsElement.cpp
index d6ab0da..71e1b91 100644
--- a/libs/rs/rsElement.cpp
+++ b/libs/rs/rsElement.cpp
@@ -364,7 +364,7 @@ void rsaElementGetNativeData(RsContext con, RsElement elem,
}
void rsaElementGetSubElements(RsContext con, RsElement elem, uint32_t *ids,
- const char **names, uint32_t dataSize) {
+ const char **names, uint32_t *arraySizes, uint32_t dataSize) {
Element *e = static_cast<Element *>(elem);
rsAssert(e->getFieldCount() == dataSize);
@@ -372,5 +372,6 @@ void rsaElementGetSubElements(RsContext con, RsElement elem, uint32_t *ids,
e->getField(i)->incUserRef();
ids[i] = (uint32_t)e->getField(i);
names[i] = e->getFieldName(i);
+ arraySizes[i] = e->getFieldArraySize(i);
}
}