Loading graphics/java/android/renderscript/Program.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -91,8 +91,9 @@ public class Program extends BaseObj { mTextureCount = 0; mTextureCount = 0; } } public void setShader(String s) { public BaseProgramBuilder setShader(String s) { mShader = s; mShader = s; return this; } } public void addInput(Element e) throws IllegalStateException { public void addInput(Element e) throws IllegalStateException { Loading Loading @@ -120,12 +121,13 @@ public class Program extends BaseObj { return mConstantCount++; return mConstantCount++; } } public void setTextureCount(int count) throws IllegalArgumentException { public BaseProgramBuilder setTextureCount(int count) throws IllegalArgumentException { // Should check for consistant and non-conflicting names... // Should check for consistant and non-conflicting names... if(count >= MAX_CONSTANT) { if(count >= MAX_CONSTANT) { throw new IllegalArgumentException("Max texture count exceeded."); throw new IllegalArgumentException("Max texture count exceeded."); } } mTextureCount = count; mTextureCount = count; return this; } } protected void initProgram(Program p) { protected void initProgram(Program p) { Loading graphics/java/android/renderscript/ProgramFragment.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -106,16 +106,18 @@ public class ProgramFragment extends Program { mPointSpriteEnable = false; mPointSpriteEnable = false; } } public void setTexture(EnvMode env, Format fmt, int slot) public Builder setTexture(EnvMode env, Format fmt, int slot) throws IllegalArgumentException { throws IllegalArgumentException { if((slot < 0) || (slot >= MAX_TEXTURE)) { if((slot < 0) || (slot >= MAX_TEXTURE)) { throw new IllegalArgumentException("MAX_TEXTURE exceeded."); throw new IllegalArgumentException("MAX_TEXTURE exceeded."); } } mSlots[slot] = new Slot(env, fmt); mSlots[slot] = new Slot(env, fmt); return this; } } public void setPointSpriteTexCoordinateReplacement(boolean enable) { public Builder setPointSpriteTexCoordinateReplacement(boolean enable) { mPointSpriteEnable = enable; mPointSpriteEnable = enable; return this; } } public ProgramFragment create() { public ProgramFragment create() { Loading graphics/java/android/renderscript/ProgramRaster.java +6 −3 Original line number Original line Diff line number Diff line Loading @@ -89,16 +89,19 @@ public class ProgramRaster extends BaseObj { mPointSprite = false; mPointSprite = false; } } public void setPointSpriteEnable(boolean enable) { public Builder setPointSpriteEnable(boolean enable) { mPointSprite = enable; mPointSprite = enable; return this; } } public void setPointSmoothEnable(boolean enable) { public Builder setPointSmoothEnable(boolean enable) { mPointSmooth = enable; mPointSmooth = enable; return this; } } public void setLineSmoothEnable(boolean enable) { public Builder setLineSmoothEnable(boolean enable) { mLineSmooth = enable; mLineSmooth = enable; return this; } } static synchronized ProgramRaster internalCreate(RenderScript rs, Builder b) { static synchronized ProgramRaster internalCreate(RenderScript rs, Builder b) { Loading graphics/java/android/renderscript/ProgramStore.java +10 −5 Original line number Original line Diff line number Diff line Loading @@ -114,28 +114,33 @@ public class ProgramStore extends BaseObj { } } public void setDepthFunc(DepthFunc func) { public Builder setDepthFunc(DepthFunc func) { mDepthFunc = func; mDepthFunc = func; return this; } } public void setDepthMask(boolean enable) { public Builder setDepthMask(boolean enable) { mDepthMask = enable; mDepthMask = enable; return this; } } public void setColorMask(boolean r, boolean g, boolean b, boolean a) { public Builder setColorMask(boolean r, boolean g, boolean b, boolean a) { mColorMaskR = r; mColorMaskR = r; mColorMaskG = g; mColorMaskG = g; mColorMaskB = b; mColorMaskB = b; mColorMaskA = a; mColorMaskA = a; return this; } } public void setBlendFunc(BlendSrcFunc src, BlendDstFunc dst) { public Builder setBlendFunc(BlendSrcFunc src, BlendDstFunc dst) { mBlendSrc = src; mBlendSrc = src; mBlendDst = dst; mBlendDst = dst; return this; } } public void setDitherEnable(boolean enable) { public Builder setDitherEnable(boolean enable) { mDither = enable; mDither = enable; return this; } } static synchronized ProgramStore internalCreate(RenderScript rs, Builder b) { static synchronized ProgramStore internalCreate(RenderScript rs, Builder b) { Loading graphics/java/android/renderscript/ProgramVertex.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -47,8 +47,9 @@ public class ProgramVertex extends Program { mRS = rs; mRS = rs; } } public void setTextureMatrixEnable(boolean enable) { public Builder setTextureMatrixEnable(boolean enable) { mTextureMatrixEnable = enable; mTextureMatrixEnable = enable; return this; } } public ProgramVertex create() { public ProgramVertex create() { Loading Loading
graphics/java/android/renderscript/Program.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -91,8 +91,9 @@ public class Program extends BaseObj { mTextureCount = 0; mTextureCount = 0; } } public void setShader(String s) { public BaseProgramBuilder setShader(String s) { mShader = s; mShader = s; return this; } } public void addInput(Element e) throws IllegalStateException { public void addInput(Element e) throws IllegalStateException { Loading Loading @@ -120,12 +121,13 @@ public class Program extends BaseObj { return mConstantCount++; return mConstantCount++; } } public void setTextureCount(int count) throws IllegalArgumentException { public BaseProgramBuilder setTextureCount(int count) throws IllegalArgumentException { // Should check for consistant and non-conflicting names... // Should check for consistant and non-conflicting names... if(count >= MAX_CONSTANT) { if(count >= MAX_CONSTANT) { throw new IllegalArgumentException("Max texture count exceeded."); throw new IllegalArgumentException("Max texture count exceeded."); } } mTextureCount = count; mTextureCount = count; return this; } } protected void initProgram(Program p) { protected void initProgram(Program p) { Loading
graphics/java/android/renderscript/ProgramFragment.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -106,16 +106,18 @@ public class ProgramFragment extends Program { mPointSpriteEnable = false; mPointSpriteEnable = false; } } public void setTexture(EnvMode env, Format fmt, int slot) public Builder setTexture(EnvMode env, Format fmt, int slot) throws IllegalArgumentException { throws IllegalArgumentException { if((slot < 0) || (slot >= MAX_TEXTURE)) { if((slot < 0) || (slot >= MAX_TEXTURE)) { throw new IllegalArgumentException("MAX_TEXTURE exceeded."); throw new IllegalArgumentException("MAX_TEXTURE exceeded."); } } mSlots[slot] = new Slot(env, fmt); mSlots[slot] = new Slot(env, fmt); return this; } } public void setPointSpriteTexCoordinateReplacement(boolean enable) { public Builder setPointSpriteTexCoordinateReplacement(boolean enable) { mPointSpriteEnable = enable; mPointSpriteEnable = enable; return this; } } public ProgramFragment create() { public ProgramFragment create() { Loading
graphics/java/android/renderscript/ProgramRaster.java +6 −3 Original line number Original line Diff line number Diff line Loading @@ -89,16 +89,19 @@ public class ProgramRaster extends BaseObj { mPointSprite = false; mPointSprite = false; } } public void setPointSpriteEnable(boolean enable) { public Builder setPointSpriteEnable(boolean enable) { mPointSprite = enable; mPointSprite = enable; return this; } } public void setPointSmoothEnable(boolean enable) { public Builder setPointSmoothEnable(boolean enable) { mPointSmooth = enable; mPointSmooth = enable; return this; } } public void setLineSmoothEnable(boolean enable) { public Builder setLineSmoothEnable(boolean enable) { mLineSmooth = enable; mLineSmooth = enable; return this; } } static synchronized ProgramRaster internalCreate(RenderScript rs, Builder b) { static synchronized ProgramRaster internalCreate(RenderScript rs, Builder b) { Loading
graphics/java/android/renderscript/ProgramStore.java +10 −5 Original line number Original line Diff line number Diff line Loading @@ -114,28 +114,33 @@ public class ProgramStore extends BaseObj { } } public void setDepthFunc(DepthFunc func) { public Builder setDepthFunc(DepthFunc func) { mDepthFunc = func; mDepthFunc = func; return this; } } public void setDepthMask(boolean enable) { public Builder setDepthMask(boolean enable) { mDepthMask = enable; mDepthMask = enable; return this; } } public void setColorMask(boolean r, boolean g, boolean b, boolean a) { public Builder setColorMask(boolean r, boolean g, boolean b, boolean a) { mColorMaskR = r; mColorMaskR = r; mColorMaskG = g; mColorMaskG = g; mColorMaskB = b; mColorMaskB = b; mColorMaskA = a; mColorMaskA = a; return this; } } public void setBlendFunc(BlendSrcFunc src, BlendDstFunc dst) { public Builder setBlendFunc(BlendSrcFunc src, BlendDstFunc dst) { mBlendSrc = src; mBlendSrc = src; mBlendDst = dst; mBlendDst = dst; return this; } } public void setDitherEnable(boolean enable) { public Builder setDitherEnable(boolean enable) { mDither = enable; mDither = enable; return this; } } static synchronized ProgramStore internalCreate(RenderScript rs, Builder b) { static synchronized ProgramStore internalCreate(RenderScript rs, Builder b) { Loading
graphics/java/android/renderscript/ProgramVertex.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -47,8 +47,9 @@ public class ProgramVertex extends Program { mRS = rs; mRS = rs; } } public void setTextureMatrixEnable(boolean enable) { public Builder setTextureMatrixEnable(boolean enable) { mTextureMatrixEnable = enable; mTextureMatrixEnable = enable; return this; } } public ProgramVertex create() { public ProgramVertex create() { Loading