Home
last modified time | relevance | path

Searched refs:alloc (Results 1 – 25 of 60) sorted by relevance

123

/frameworks/rs/driver/
DrsdAllocation.cpp90 uint8_t *GetOffsetPtr(const android::renderscript::Allocation *alloc, in GetOffsetPtr() argument
93 uint8_t *ptr = (uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr; in GetOffsetPtr()
94 ptr += face * alloc->mHal.drvState.faceOffset; in GetOffsetPtr()
95 ptr += zoff * alloc->mHal.drvState.lod[lod].dimY * alloc->mHal.drvState.lod[lod].stride; in GetOffsetPtr()
96 ptr += yoff * alloc->mHal.drvState.lod[lod].stride; in GetOffsetPtr()
97 ptr += xoff * alloc->mHal.state.elementSizeBytes; in GetOffsetPtr()
102 static void Update2DTexture(const Context *rsc, const Allocation *alloc, const void *ptr, in Update2DTexture() argument
106 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in Update2DTexture()
112 if (alloc->mHal.state.hasFaces) { in Update2DTexture()
121 static void Upload2DTexture(const Context *rsc, const Allocation *alloc, bool isFirstUpload) { in Upload2DTexture() argument
[all …]
DrsdAllocation.h54 const android::renderscript::Allocation *alloc; member
93 android::renderscript::Allocation *alloc,
96 android::renderscript::Allocation *alloc);
99 const android::renderscript::Allocation *alloc,
102 const android::renderscript::Allocation *alloc,
105 const android::renderscript::Allocation *alloc);
107 const android::renderscript::Allocation *alloc);
109 android::renderscript::Allocation *alloc, ANativeWindow *nw);
111 android::renderscript::Allocation *alloc);
113 android::renderscript::Allocation *alloc);
[all …]
DrsdMeshObj.cpp136 const Allocation *alloc = mRSMesh->mHal.state.vertexBuffers[ct]; in renderPrimitiveRange() local
137 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in renderPrimitiveRange()
139 rsdAllocationSyncAll(rsc, alloc, RS_ALLOCATION_USAGE_SCRIPT); in renderPrimitiveRange()
146 Allocation *alloc = mRSMesh->mHal.state.vertexBuffers[allocIndex]; in renderPrimitiveRange() local
147 DrvAllocation *drvAlloc = (DrvAllocation *)alloc->mHal.drv; in renderPrimitiveRange()
154 mAttribs[ct].ptr = (const uint8_t*)alloc->mHal.drvState.lod[0].mallocPtr; in renderPrimitiveRange()
/frameworks/compile/libbcc/lib/Renderscript/runtime/
Drs_allocation.c8 Allocation_t *alloc = (Allocation_t *)a.p; in rsAllocationGetDimX() local
9 return alloc->mHal.drvState.lod[0].dimX; in rsAllocationGetDimX()
14 Allocation_t *alloc = (Allocation_t *)a.p; in rsAllocationGetDimY() local
15 return alloc->mHal.drvState.lod[0].dimY; in rsAllocationGetDimY()
20 Allocation_t *alloc = (Allocation_t *)a.p; in rsAllocationGetDimZ() local
21 return alloc->mHal.drvState.lod[0].dimZ; in rsAllocationGetDimZ()
26 Allocation_t *alloc = (Allocation_t *)a.p; in rsAllocationGetDimLOD() local
27 return alloc->mHal.state.hasMipmaps; in rsAllocationGetDimLOD()
32 Allocation_t *alloc = (Allocation_t *)a.p; in rsAllocationGetDimFaces() local
33 return alloc->mHal.state.hasFaces; in rsAllocationGetDimFaces()
[all …]
Drs_sample.c269 getBilinearSample1D(const Allocation_t *alloc, float2 weights, in getBilinearSample1D() argument
273 const uint8_t *p = (const uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr; in getBilinearSample1D()
319 getBilinearSample2D(const Allocation_t *alloc, float w0, float w1, float w2, float w3, in getBilinearSample2D() argument
323 const uint8_t *p = (const uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr; in getBilinearSample2D()
324 size_t stride = alloc->mHal.drvState.lod[lod].stride; in getBilinearSample2D()
351 getNearestSample(const Allocation_t *alloc, uint32_t iPixel, rs_data_kind dk, in getNearestSample() argument
354 const uint8_t *p = (const uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr; in getNearestSample()
388 getNearestSample(const Allocation_t *alloc, uint2 iPixel, rs_data_kind dk, in getNearestSample() argument
391 const uint8_t *p = (const uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr; in getNearestSample()
392 size_t stride = alloc->mHal.drvState.lod[lod].stride; in getNearestSample()
[all …]
/frameworks/base/libs/hwui/
DDisplayListRenderer.cpp151 addDrawOp(new (alloc()) DrawFunctorOp(functor)); in callDrawGLFunction()
157 addStateOp(new (alloc()) SaveOp(flags)); in save()
180 addStateOp(new (alloc()) SaveLayerOp(left, top, right, bottom, alpha, mode, flags)); in saveLayer()
193 addStateOp(new (alloc()) RotateOp(degrees)); in rotate()
198 addStateOp(new (alloc()) ScaleOp(sx, sy)); in scale()
203 addStateOp(new (alloc()) SkewOp(sx, sy)); in skew()
209 addStateOp(new (alloc()) SetMatrixOp(matrix)); in setMatrix()
215 addStateOp(new (alloc()) ConcatMatrixOp(matrix)); in concatMatrix()
221 addStateOp(new (alloc()) ClipRectOp(left, top, right, bottom, op)); in clipRect()
227 addStateOp(new (alloc()) ClipPathOp(path, op)); in clipPath()
[all …]
/frameworks/rs/cpu_ref/
DrsCpuIntrinsicYuvToRGB.cpp43 ObjectBaseRef<Allocation> alloc; member in android::renderscript::RsdCpuScriptIntrinsicYuvToRGB
56 alloc.set(static_cast<Allocation *>(data)); in setGlobalObj()
112 if (!cp->alloc.get()) { in kernel()
116 const uchar *pinY = (const uchar *)cp->alloc->mHal.drvState.lod[0].mallocPtr; in kernel()
118 size_t strideY = cp->alloc->mHal.drvState.lod[0].stride; in kernel()
121 if (cp->alloc->mHal.drvState.lod[0].dimY == 0) { in kernel()
134 switch (cp->alloc->mHal.state.yuv) { in kernel()
141 const uchar *pinUV = (const uchar *)cp->alloc->mHal.drvState.lod[1].mallocPtr; in kernel()
142 size_t strideUV = cp->alloc->mHal.drvState.lod[1].stride; in kernel()
148 uv = ((uint8_t *)cp->alloc->mHal.drvState.lod[0].mallocPtr) + in kernel()
[all …]
DrsCpuIntrinsicConvolve5x5.cpp42 ObjectBaseRef<Allocation> alloc; member in android::renderscript::RsdCpuScriptIntrinsicConvolve5x5
57 alloc.set(static_cast<Allocation *>(data)); in setGlobalObj()
127 if (!cp->alloc.get()) { in kernel()
131 const uchar *pin = (const uchar *)cp->alloc->mHal.drvState.lod[0].mallocPtr; in kernel()
132 const size_t stride = cp->alloc->mHal.drvState.lod[0].stride; in kernel()
192 alloc.clear(); in invokeFreeChildren()
/frameworks/rs/
Drs_hal.h146 bool (*init)(const Context *rsc, Allocation *alloc, bool forceZero);
147 void (*destroy)(const Context *rsc, Allocation *alloc);
149 void (*resize)(const Context *rsc, const Allocation *alloc, const Type *newType,
151 void (*syncAll)(const Context *rsc, const Allocation *alloc, RsAllocationUsageType src);
152 void (*markDirty)(const Context *rsc, const Allocation *alloc);
154 void * (*getSurface)(const Context *rsc, const Allocation *alloc);
155 void (*setSurface)(const Context *rsc, Allocation *alloc, ANativeWindow *sur);
156 void (*ioSend)(const Context *rsc, Allocation *alloc);
157 void (*ioReceive)(const Context *rsc, Allocation *alloc);
159 void (*data1D)(const Context *rsc, const Allocation *alloc,
[all …]
DrsProgram.cpp139 void Program::bindAllocation(Context *rsc, Allocation *alloc, uint32_t slot) { in bindAllocation() argument
140 if (alloc != NULL) { in bindAllocation()
147 if (alloc->getType() != mConstantTypes[slot].get()) { in bindAllocation()
154 if (mConstants[slot].get() == alloc) { in bindAllocation()
160 mConstants[slot].set(alloc); in bindAllocation()
161 mHal.state.constants[slot] = alloc; in bindAllocation()
162 if (alloc) { in bindAllocation()
163 alloc->addProgramToDirty(this); in bindAllocation()
Drs_native.spec3 param RsAllocation alloc
7 param RsAllocation alloc
DrsAllocation.cpp370 Allocation *alloc = Allocation::createAllocation(rsc, type, RS_ALLOCATION_USAGE_SCRIPT); in createFromStream() local
376 uint32_t packedSize = alloc->getPackedSize(); in createFromStream()
380 ObjectBase::checkDelete(alloc); in createFromStream()
385 alloc->setName(name.string(), name.size()); in createFromStream()
390 alloc->data(rsc, 0, 0, count, stream->getPtr() + stream->getPos(), dataSize); in createFromStream()
392 alloc->unpackVec3Allocation(rsc, stream->getPtr() + stream->getPos(), dataSize); in createFromStream()
396 return alloc; in createFromStream()
488 Allocation *alloc = static_cast<Allocation *>(va); in rsi_AllocationGenerateMipmaps() local
489 rsc->mHal.funcs.allocation.generateMipmaps(rsc, alloc); in rsi_AllocationGenerateMipmaps()
555 …Allocation * alloc = Allocation::createAllocation(rsc, static_cast<Type *>(vtype), usages, mips, (… in rsi_AllocationCreateTyped() local
[all …]
DrsAdapter.cpp62 Allocation * alloc = static_cast<Allocation *>(valloc); in rsi_Adapter1DBindAllocation() local
63 a->setAllocation(alloc); in rsi_Adapter1DBindAllocation()
136 Allocation * alloc = static_cast<Allocation *>(valloc); in rsi_Adapter2DBindAllocation() local
137 a->setAllocation(alloc); in rsi_Adapter2DBindAllocation()
DrsScriptGroup.cpp237 Allocation * alloc = Allocation::createAllocation(rsc, in create() local
239 l->mAlloc = alloc; in create()
243 n->mOutputs[ct3]->mAlloc = alloc; in create()
368 RsAllocation alloc) { in rsi_ScriptGroupSetInput() argument
371 s->setInput(rsc, (ScriptKernelID *)kid, (Allocation *)alloc); in rsi_ScriptGroupSetInput()
375 RsAllocation alloc) { in rsi_ScriptGroupSetOutput() argument
378 s->setOutput(rsc, (ScriptKernelID *)kid, (Allocation *)alloc); in rsi_ScriptGroupSetOutput()
Drs.spec74 param RsAllocation alloc
80 param RsAllocation alloc
128 param RsAllocation alloc
391 param RsAllocation alloc
397 param RsAllocation alloc
/frameworks/support/v8/renderscript/jni/
Dandroid_renderscript_RenderScript.cpp355 nAllocationGenerateMipmaps(JNIEnv *_env, jobject _this, RsContext con, jint alloc) in nAllocationGenerateMipmaps() argument
357 LOG_API("nAllocationGenerateMipmaps, con(%p), a(%p)", con, (RsAllocation)alloc); in nAllocationGenerateMipmaps()
358 rsAllocationGenerateMipmaps(con, (RsAllocation)alloc); in nAllocationGenerateMipmaps()
423 nAllocationCopyFromBitmap(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jobject jbitmap) in nAllocationCopyFromBitmap() argument
433 rsAllocation2DData(con, (RsAllocation)alloc, 0, 0, in nAllocationCopyFromBitmap()
441 nAllocationCopyToBitmap(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jobject jbitmap) in nAllocationCopyToBitmap() argument
451 rsAllocationCopyToBitmap(con, (RsAllocation)alloc, pixels, GetBitmapSize(_env, jbitmap)); in nAllocationCopyToBitmap()
459 nAllocationData1D_i(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint offset, jint lod, … in nAllocationData1D_i() argument
462 …r(%p), offset(%i), count(%i), len(%i), sizeBytes(%i)", con, (RsAllocation)alloc, offset, count, le… in nAllocationData1D_i()
464 rsAllocation1DData(con, (RsAllocation)alloc, offset, lod, count, ptr, sizeBytes); in nAllocationData1D_i()
[all …]
/frameworks/base/graphics/jni/
Dandroid_renderscript_RenderScript.cpp487 nAllocationSetSurface(JNIEnv *_env, jobject _this, RsContext con, RsAllocation alloc, jobject sur) in nAllocationSetSurface() argument
490 con, alloc, (Surface *)sur); in nAllocationSetSurface()
497 rsAllocationSetSurface(con, alloc, static_cast<ANativeWindow *>(s.get())); in nAllocationSetSurface()
501 nAllocationIoSend(JNIEnv *_env, jobject _this, RsContext con, RsAllocation alloc) in nAllocationIoSend() argument
503 LOG_API("nAllocationIoSend, con(%p), alloc(%p)", con, alloc); in nAllocationIoSend()
504 rsAllocationIoSend(con, alloc); in nAllocationIoSend()
508 nAllocationIoReceive(JNIEnv *_env, jobject _this, RsContext con, RsAllocation alloc) in nAllocationIoReceive() argument
510 LOG_API("nAllocationIoReceive, con(%p), alloc(%p)", con, alloc); in nAllocationIoReceive()
511 rsAllocationIoReceive(con, alloc); in nAllocationIoReceive()
516 nAllocationGenerateMipmaps(JNIEnv *_env, jobject _this, RsContext con, jint alloc) in nAllocationGenerateMipmaps() argument
[all …]
/frameworks/native/libs/utils/
DSharedBuffer.cpp27 SharedBuffer* SharedBuffer::alloc(size_t size) in alloc() function in android::SharedBuffer
50 SharedBuffer* sb = alloc(mSize); in edit()
69 SharedBuffer* sb = alloc(newSize); in editResize()
89 SharedBuffer* sb = alloc(new_size); in reset()
/frameworks/base/graphics/java/android/renderscript/
DRenderScript.java321 native void rsnAllocationCopyToBitmap(int con, int alloc, Bitmap bmp); in rsnAllocationCopyToBitmap() argument
322 synchronized void nAllocationCopyToBitmap(int alloc, Bitmap bmp) { in nAllocationCopyToBitmap() argument
324 rsnAllocationCopyToBitmap(mContext, alloc, bmp); in nAllocationCopyToBitmap()
328 native void rsnAllocationSyncAll(int con, int alloc, int src); in rsnAllocationSyncAll() argument
329 synchronized void nAllocationSyncAll(int alloc, int src) { in nAllocationSyncAll() argument
331 rsnAllocationSyncAll(mContext, alloc, src); in nAllocationSyncAll()
333 native Surface rsnAllocationGetSurface(int con, int alloc); in rsnAllocationGetSurface() argument
334 synchronized Surface nAllocationGetSurface(int alloc) { in nAllocationGetSurface() argument
336 return rsnAllocationGetSurface(mContext, alloc); in nAllocationGetSurface()
338 native void rsnAllocationSetSurface(int con, int alloc, Surface sur); in rsnAllocationSetSurface() argument
[all …]
DMesh.java362 Allocation alloc = null; in create() local
365 alloc = Allocation.createTyped(mRS, entry.t, mUsage); in create()
367 alloc = Allocation.createSized(mRS, entry.e, entry.size, mUsage); in create()
369 vertexBuffers[ct] = alloc; in create()
370 vtx[ct] = alloc.getID(mRS); in create()
374 Allocation alloc = null; in create() local
377 alloc = Allocation.createTyped(mRS, entry.t, mUsage); in create()
379 alloc = Allocation.createSized(mRS, entry.e, entry.size, mUsage); in create()
381 int allocID = (alloc == null) ? 0 : alloc.getID(mRS); in create()
382 indexBuffers[ct] = alloc; in create()
DAllocationAdapter.java28 AllocationAdapter(int id, RenderScript rs, Allocation alloc) { in AllocationAdapter() argument
29 super(id, rs, alloc.mType, alloc.mUsage); in AllocationAdapter()
30 mAdaptedAllocation = alloc; in AllocationAdapter()
/frameworks/support/v8/renderscript/java/src/android/support/v8/renderscript/
DRenderScript.java215 native void rsnAllocationCopyToBitmap(int con, int alloc, Bitmap bmp); in rsnAllocationCopyToBitmap() argument
216 synchronized void nAllocationCopyToBitmap(int alloc, Bitmap bmp) { in nAllocationCopyToBitmap() argument
218 rsnAllocationCopyToBitmap(mContext, alloc, bmp); in nAllocationCopyToBitmap()
222 native void rsnAllocationSyncAll(int con, int alloc, int src); in rsnAllocationSyncAll() argument
223 synchronized void nAllocationSyncAll(int alloc, int src) { in nAllocationSyncAll() argument
225 rsnAllocationSyncAll(mContext, alloc, src); in nAllocationSyncAll()
227 native void rsnAllocationIoSend(int con, int alloc); in rsnAllocationIoSend() argument
228 synchronized void nAllocationIoSend(int alloc) { in nAllocationIoSend() argument
230 rsnAllocationIoSend(mContext, alloc); in nAllocationIoSend()
232 native void rsnAllocationIoReceive(int con, int alloc); in rsnAllocationIoReceive() argument
[all …]
/frameworks/base/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/
DFakeBackgroundService.java49 int[] alloc = new int[FakeApp.PAGE_SIZE/4];
50 mAllocs.add(alloc);
53 alloc[j] = VAL;
/frameworks/rs/java/tests/SampleTest/src/com/android/rs/sample/
DSampleRSActivity.java151 private synchronized void filterAlloc(Allocation alloc, Sampler sampler) { in filterAlloc() argument
153 mScript.invoke_setSampleData(alloc, mTwoByTwoAlloc, sampler); in filterAlloc()
154 mScript.forEach_root(alloc); in filterAlloc()
155 alloc.ioSendOutput(); in filterAlloc()
/frameworks/base/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/
DSceneManager.java214 Allocation alloc = Allocation.createSized(rs, Element.U8(rs), in getStringAsAllocation() local
217 alloc.copy1DRangeFrom(0, allocArray.length, allocArray); in getStringAsAllocation()
218 alloc.copy1DRangeFrom(allocArray.length, 1, nullChar); in getStringAsAllocation()
219 return alloc; in getStringAsAllocation()
233 static void cacheAlloc(String str, Allocation alloc) { in cacheAlloc() argument
237 sSceneManager.mAllocationMap.put(str, alloc); in cacheAlloc()

123