Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4270295a authored by Alex Sakhartchouk's avatar Alex Sakhartchouk Committed by Android (Google) Code Review
Browse files

Merge "Fixing asynchronous performance issues."

parents 5a9ffaa4 117abdbc
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -127,6 +127,7 @@ ObjDestroy {
	}

ElementCreate {
        direct
	param RsDataType mType
	param RsDataKind mKind
	param bool mNormalized
@@ -135,6 +136,7 @@ ElementCreate {
	}

ElementCreate2 {
        direct
	param const RsElement * elements
	param const char ** names
	param const uint32_t * arraySize
@@ -226,6 +228,7 @@ AllocationCopy2DRange {
	}

SamplerCreate {
    direct
    param RsSamplerValue magFilter
    param RsSamplerValue minFilter
    param RsSamplerValue wrapS
@@ -311,6 +314,7 @@ ScriptCCreate {


ProgramStoreCreate {
	direct
	param bool colorMaskR
	param bool colorMaskG
	param bool colorMaskB
@@ -324,6 +328,7 @@ ProgramStoreCreate {
	}

ProgramRasterCreate {
	direct
	param bool pointSmooth
	param bool lineSmooth
	param bool pointSprite
@@ -352,12 +357,14 @@ ProgramBindSampler {
	}

ProgramFragmentCreate {
	direct
	param const char * shaderText
	param const uint32_t * params
	ret RsProgramFragment
	}

ProgramVertexCreate {
	direct
	param const char * shaderText
	param const uint32_t * params
	ret RsProgramVertex
+4 −3
Original line number Diff line number Diff line
@@ -252,6 +252,7 @@ Allocation *Allocation::createFromStream(Context *rsc, IStream *stream) {

    Allocation *alloc = Allocation::createAllocation(rsc, type, RS_ALLOCATION_USAGE_SCRIPT);
    alloc->setName(name.string(), name.size());
    type->decUserRef();

    uint32_t count = dataSize / type->getElementSizeBytes();

@@ -307,12 +308,12 @@ void Allocation::resize1D(Context *rsc, uint32_t dimX) {
        return;
    }

    Type *t = mHal.state.type->cloneAndResize1D(rsc, dimX);
    ObjectBaseRef<Type> t = mHal.state.type->cloneAndResize1D(rsc, dimX);
    if (dimX < oldDimX) {
        decRefs(getPtr(), oldDimX - dimX, dimX);
    }
    rsc->mHal.funcs.allocation.resize(rsc, this, t, mHal.state.hasReferences);
    mHal.state.type.set(t);
    rsc->mHal.funcs.allocation.resize(rsc, this, t.get(), mHal.state.hasReferences);
    mHal.state.type.set(t.get());
    updateCache();
}

+0 −30
Original line number Diff line number Diff line
@@ -176,36 +176,6 @@ bool Component::isReference() const {
    return (mType >= RS_TYPE_ELEMENT);
}

String8 Component::getGLSLType() const {
    if (mType == RS_TYPE_SIGNED_32) {
        switch (mVectorSize) {
        case 1: return String8("int");
        case 2: return String8("ivec2");
        case 3: return String8("ivec3");
        case 4: return String8("ivec4");
        }
    }
    if (mType == RS_TYPE_FLOAT_32) {
        switch (mVectorSize) {
        case 1: return String8("float");
        case 2: return String8("vec2");
        case 3: return String8("vec3");
        case 4: return String8("vec4");
        }
    }
    if ((mType == RS_TYPE_MATRIX_4X4) && (mVectorSize == 1)) {
        return String8("mat4");
    }
    if ((mType == RS_TYPE_MATRIX_3X3) && (mVectorSize == 1)) {
        return String8("mat3");
    }
    if ((mType == RS_TYPE_MATRIX_2X2) && (mVectorSize == 1)) {
        return String8("mat2");
    }
    return String8();
}


static const char * gTypeBasicStrings[] = {
    "NONE",
    "F16",
+0 −2
Original line number Diff line number Diff line
@@ -32,10 +32,8 @@ public:

    void set(RsDataType dt, RsDataKind dk, bool norm, uint32_t vecSize=1);

    String8 getGLSLType() const;
    void dumpLOGV(const char *prefix) const;


    RsDataType getType() const {return mType;}
    RsDataKind getKind() const {return mKind;}
    bool getIsNormalized() const {return mNormalized;}
+2 −0
Original line number Diff line number Diff line
@@ -240,6 +240,7 @@ void * Context::threadProc(void *vrsc) {
        rsc->setProgramStore(NULL);
        rsc->mStateFont.init(rsc);
        rsc->setFont(NULL);
        rsc->mStateSampler.init(rsc);
        rsc->mFBOCache.init(rsc);
    }

@@ -307,6 +308,7 @@ void Context::destroyWorkerThreadResources() {
         mStateFragment.deinit(this);
         mStateFragmentStore.deinit(this);
         mStateFont.deinit(this);
         mStateSampler.deinit(this);
         mFBOCache.deinit(this);
    }
    //LOGV("destroyWorkerThreadResources 2");
Loading