summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsAdapter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/rs/rsAdapter.cpp')
-rw-r--r--libs/rs/rsAdapter.cpp32
1 files changed, 23 insertions, 9 deletions
diff --git a/libs/rs/rsAdapter.cpp b/libs/rs/rsAdapter.cpp
index 0d31fac..1d1425c 100644
--- a/libs/rs/rsAdapter.cpp
+++ b/libs/rs/rsAdapter.cpp
@@ -15,7 +15,11 @@
* limitations under the License.
*/
+#ifndef ANDROID_RS_BUILD_FOR_HOST
#include "rsContext.h"
+#else
+#include "rsContextHostStub.h"
+#endif
using namespace android;
using namespace android::renderscript;
@@ -23,15 +27,11 @@ using namespace android::renderscript;
Adapter1D::Adapter1D(Context *rsc) : ObjectBase(rsc)
{
- mAllocFile = __FILE__;
- mAllocLine = __LINE__;
reset();
}
Adapter1D::Adapter1D(Context *rsc, Allocation *a) : ObjectBase(rsc)
{
- mAllocFile = __FILE__;
- mAllocLine = __LINE__;
reset();
setAllocation(a);
}
@@ -70,6 +70,16 @@ void Adapter1D::data(const void *data)
mAllocation.get()->getType()->getSizeBytes());
}
+void Adapter1D::serialize(OStream *stream) const
+{
+
+}
+
+Adapter1D *Adapter1D::createFromStream(Context *rsc, IStream *stream)
+{
+ return NULL;
+}
+
namespace android {
namespace renderscript {
@@ -131,15 +141,11 @@ void rsi_Adapter1DData(Context *rsc, RsAdapter1D va, const void *data)
Adapter2D::Adapter2D(Context *rsc) : ObjectBase(rsc)
{
- mAllocFile = __FILE__;
- mAllocLine = __LINE__;
reset();
}
Adapter2D::Adapter2D(Context *rsc, Allocation *a) : ObjectBase(rsc)
{
- mAllocFile = __FILE__;
- mAllocLine = __LINE__;
reset();
setAllocation(a);
}
@@ -169,7 +175,6 @@ void Adapter2D::subData(uint32_t xoff, uint32_t yoff, uint32_t w, uint32_t h, co
uint32_t eSize = mAllocation.get()->getType()->getElementSizeBytes();
uint32_t lineSize = eSize * w;
- uint32_t destW = getDimX();
const uint8_t *src = static_cast<const uint8_t *>(data);
for (uint32_t line=yoff; line < (yoff+h); line++) {
@@ -185,6 +190,15 @@ void Adapter2D::data(const void *data)
mAllocation.get()->getType()->getSizeBytes());
}
+void Adapter2D::serialize(OStream *stream) const
+{
+
+}
+
+Adapter2D *Adapter2D::createFromStream(Context *rsc, IStream *stream)
+{
+ return NULL;
+}
namespace android {