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

Commit 2caad1dc authored by Jason Sams's avatar Jason Sams Committed by Android (Google) Code Review
Browse files

Merge "Remove points from fixed function. Add basic GL performance test."

parents a6935ab0 53a93d5e
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ public class ProgramRaster extends BaseObj {
    boolean mPointSmooth;
    boolean mLineSmooth;
    boolean mPointSprite;
    float mPointSize;
    float mLineWidth;
    Element mIn;
    Element mOut;
@@ -38,7 +37,6 @@ public class ProgramRaster extends BaseObj {
        super(rs);
        mID = id;

        mPointSize = 1.0f;
        mLineWidth = 1.0f;
        mPointSmooth = false;
        mLineSmooth = false;
@@ -51,12 +49,6 @@ public class ProgramRaster extends BaseObj {
        mRS.nProgramRasterSetLineWidth(mID, w);
    }

    public void setPointSize(float s) {
        mRS.validate();
        mPointSize = s;
        mRS.nProgramRasterSetPointSize(mID, s);
    }

    void internalInit() {
        int inID = 0;
        int outID = 0;
+0 −1
Original line number Diff line number Diff line
@@ -167,7 +167,6 @@ public class RenderScript {

    native int  nProgramRasterCreate(int in, int out, boolean pointSmooth, boolean lineSmooth, boolean pointSprite);
    native void nProgramRasterSetLineWidth(int pr, float v);
    native void nProgramRasterSetPointSize(int pr, float v);

    native void nProgramBindConstants(int pv, int slot, int mID);
    native void nProgramBindTexture(int vpf, int slot, int a);
+0 −9
Original line number Diff line number Diff line
@@ -1212,14 +1212,6 @@ nProgramRasterCreate(JNIEnv *_env, jobject _this, jint in, jint out,
    return (jint)rsProgramRasterCreate(con, (RsElement)in, (RsElement)out, pointSmooth, lineSmooth, pointSprite);
}

static void
nProgramRasterSetPointSize(JNIEnv *_env, jobject _this, jint vpr, jfloat v)
{
    RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
    LOG_API("nProgramRasterSetPointSize, con(%p), vpf(%p), value(%f)", con, (RsProgramRaster)vpr, v);
    rsProgramRasterSetPointSize(con, (RsProgramFragment)vpr, v);
}

static void
nProgramRasterSetLineWidth(JNIEnv *_env, jobject _this, jint vpr, jfloat v)
{
@@ -1482,7 +1474,6 @@ static JNINativeMethod methods[] = {
{"nProgramFragmentCreate2",        "(Ljava/lang/String;[I)I",              (void*)nProgramFragmentCreate2 },

{"nProgramRasterCreate",           "(IIZZZ)I",                             (void*)nProgramRasterCreate },
{"nProgramRasterSetPointSize",     "(IF)V",                                (void*)nProgramRasterSetPointSize },
{"nProgramRasterSetLineWidth",     "(IF)V",                                (void*)nProgramRasterSetLineWidth },

{"nProgramVertexCreate",           "(Z)I",                                 (void*)nProgramVertexCreate },
+0 −5
Original line number Diff line number Diff line
@@ -360,11 +360,6 @@ ProgramRasterSetLineWidth {
	param float lw
}

ProgramRasterSetPointSize{
	param RsProgramRaster pr
	param float ps
}


ProgramBindConstants {
	param RsProgram vp
+1 −15
Original line number Diff line number Diff line
@@ -41,8 +41,6 @@ ProgramRaster::ProgramRaster(Context *rsc,
    mPointSmooth = pointSmooth;
    mLineSmooth = lineSmooth;
    mPointSprite = pointSprite;

    mPointSize = 1.0f;
    mLineWidth = 1.0f;
}

@@ -55,11 +53,6 @@ void ProgramRaster::setLineWidth(float s)
    mLineWidth = s;
}

void ProgramRaster::setPointSize(float s)
{
    mPointSize = s;
}

void ProgramRaster::setupGL(const Context *rsc, ProgramRasterState *state)
{
    if (state->mLast.get() == this) {
@@ -67,7 +60,6 @@ void ProgramRaster::setupGL(const Context *rsc, ProgramRasterState *state)
    }
    state->mLast.set(this);

    glPointSize(mPointSize);
    if (mPointSmooth) {
        glEnable(GL_POINT_SMOOTH);
    } else {
@@ -147,12 +139,6 @@ RsProgramRaster rsi_ProgramRasterCreate(Context * rsc, RsElement in, RsElement o
    return pr;
}

void rsi_ProgramRasterSetPointSize(Context * rsc, RsProgramRaster vpr, float s)
{
    ProgramRaster *pr = static_cast<ProgramRaster *>(vpr);
    pr->setPointSize(s);
}

void rsi_ProgramRasterSetLineWidth(Context * rsc, RsProgramRaster vpr, float s)
{
    ProgramRaster *pr = static_cast<ProgramRaster *>(vpr);
Loading