Home
last modified time | relevance | path

Searched refs:mProgram (Results 1 – 25 of 58) sorted by relevance

123

/frameworks/base/media/mca/filterfw/java/android/filterfw/core/
DProgramVariable.java25 private Program mProgram; field in ProgramVariable
29 mProgram = program; in ProgramVariable()
34 return mProgram; in getProgram()
42 if (mProgram == null) { in setValue()
46 mProgram.setHostValue(mVarName, value); in setValue()
50 if (mProgram == null) { in getValue()
54 return mProgram.getHostValue(mVarName); in getValue()
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/imageproc/
DLomoishFilter.java36 private Program mProgram; field in LomoishFilter
141 mProgram = shaderProgram; in initProgram()
152 if (mProgram !=null) { in initParameters()
163 mProgram.setHostValue("scale", scale); in initParameters()
164 mProgram.setHostValue("inv_max_dist", 1.0f / max_dist); in initParameters()
166 mProgram.setHostValue("stepsize", 1.0f / 255.0f); in initParameters()
167 mProgram.setHostValue("stepsizeX", 1.0f / mWidth); in initParameters()
168 mProgram.setHostValue("stepsizeY", 1.0f / mHeight); in initParameters()
171 mProgram.setHostValue("seed", seed); in initParameters()
182 if (mProgram == null || inputFormat.getTarget() != mTarget) { in process()
[all …]
DVignetteFilter.java36 private Program mProgram; field in VignetteFilter
82 mProgram = shaderProgram; in initProgram()
93 if (mProgram != null) { in initParameters()
103 mProgram.setHostValue("scale", scale); in initParameters()
104 mProgram.setHostValue("inv_max_dist", 1f / max_dist); in initParameters()
105 mProgram.setHostValue("shade", mShade); in initParameters()
115 mProgram.setHostValue("range", 1.30f - (float) Math.sqrt(mScale) * 0.7f); in updateParameters()
120 if (mProgram != null) { in fieldPortValueUpdated()
132 if (mProgram == null || inputFormat.getTarget() != mTarget) { in process()
147 mProgram.process(input, output); in process()
DBlackWhiteFilter.java42 private Program mProgram; field in BlackWhiteFilter
106 mProgram = shaderProgram; in initProgram()
120 mProgram.setHostValue("black", mBlack); in updateParameters()
121 mProgram.setHostValue("scale", scale); in updateParameters()
122 mProgram.setHostValue("stepsize", stepsize); in updateParameters()
125 mProgram.setHostValue("seed", seed); in updateParameters()
130 if (mProgram != null) { in fieldPortValueUpdated()
142 if (mProgram == null || inputFormat.getTarget() != mTarget) { in process()
150 mProgram.process(input, output); in process()
DSharpenFilter.java36 private Program mProgram; field in SharpenFilter
88 mProgram = shaderProgram; in initProgram()
108 if (mProgram == null || inputFormat.getTarget() != mTarget) { in process()
118 mProgram.process(input, output); in process()
131 if (mProgram != null) { in updateFrameSize()
132 mProgram.setHostValue("stepsizeX", 1.0f / mWidth); in updateFrameSize()
133 mProgram.setHostValue("stepsizeY", 1.0f / mHeight); in updateFrameSize()
139 mProgram.setHostValue("scale", mScale); in updateParameters()
144 if (mProgram != null) { in fieldPortValueUpdated()
DDocumentaryFilter.java36 private Program mProgram; field in DocumentaryFilter
101 mProgram = shaderProgram; in initProgram()
118 if (mProgram == null || inputFormat.getTarget() != mTarget) { in process()
133 mProgram.process(input, output); in process()
143 if (mProgram != null) { in initParameters()
154 mProgram.setHostValue("scale", scale); in initParameters()
155 mProgram.setHostValue("inv_max_dist", 1.0f / max_dist); in initParameters()
156 mProgram.setHostValue("stepsize", 1.0f / 255.0f); in initParameters()
159 mProgram.setHostValue("seed", seed); in initParameters()
DFisheyeFilter.java46 private Program mProgram; field in FisheyeFilter
94 mProgram = shaderProgram; in initProgram()
114 if (mProgram == null || inputFormat.getTarget() != mTarget) { in process()
124 mProgram.process(input, output); in process()
135 if (mProgram != null) { in fieldPortValueUpdated()
166 mProgram.setHostValue("scale", scale); in updateProgramParams()
167 mProgram.setHostValue("radius2",radius2); in updateProgramParams()
168 mProgram.setHostValue("factor", factor); in updateProgramParams()
169 mProgram.setHostValue("alpha", alpha); in updateProgramParams()
DCropFilter.java37 private Program mProgram; field in CropFilter
91 mProgram = null; in createProgram()
95 mProgram = new ShaderProgram(context, mFragShader); in createProgram()
97 mProgram = ShaderProgram.createIdentity(context); in createProgram()
101 if (mProgram == null) { in createProgram()
126 if (mProgram instanceof ShaderProgram) { in process()
127 ShaderProgram shaderProgram = (ShaderProgram)mProgram; in process()
131 mProgram.process(imageFrame, output); in process()
DSimpleImageFilter.java35 protected Program mProgram; field in SimpleImageFilter
75 mProgram.process(input, output); in process()
88 mProgram = getNativeProgram(context); in updateProgramWithTarget()
92 mProgram = getShaderProgram(context); in updateProgramWithTarget()
96 mProgram = null; in updateProgramWithTarget()
99 if (mProgram == null) { in updateProgramWithTarget()
102 initProgramInputs(mProgram, context); in updateProgramWithTarget()
DTintFilter.java37 private Program mProgram; field in TintFilter
73 mProgram = shaderProgram; in initProgram()
85 if (mProgram != null) { in fieldPortValueUpdated()
97 if (mProgram == null || inputFormat.getTarget() != mTarget) { in process()
106 mProgram.process(input, output); in process()
117 mProgram.setHostValue("color_ratio", color_ratio); in initParameters()
127 mProgram.setHostValue("tint", tint_color); in updateParameters()
DFillLightFilter.java38 private Program mProgram; field in FillLightFilter
82 mProgram = shaderProgram; in initProgram()
103 if (mProgram == null || inputFormat.getTarget() != mTarget) { in process()
109 mProgram.process(input, output); in process()
121 if (mProgram != null) { in fieldPortValueUpdated()
133 mProgram.setHostValue("mult", mult); in updateParameters()
134 mProgram.setHostValue("igamma", igamma); in updateParameters()
DImageCombineFilter.java34 protected Program mProgram; field in ImageCombineFilter
97 mProgram.process(inputs, output); in process()
110 mProgram = getNativeProgram(context); in updateProgramWithTarget()
114 mProgram = getShaderProgram(context); in updateProgramWithTarget()
118 mProgram = null; in updateProgramWithTarget()
121 if (mProgram == null) { in updateProgramWithTarget()
125 initProgramInputs(mProgram, context); in updateProgramWithTarget()
DColorTemperatureFilter.java36 private Program mProgram; field in ColorTemperatureFilter
79 mProgram = shaderProgram; in initProgram()
96 if (mProgram == null || inputFormat.getTarget() != mTarget) { in process()
105 mProgram.process(input, output); in process()
115 mProgram.setHostValue("scale", 2.0f * mScale - 1.0f); in updateParameters()
120 if (mProgram != null) { in fieldPortValueUpdated()
DDuotoneFilter.java40 private Program mProgram; field in DuotoneFilter
76 mProgram = shaderProgram; in initProgram()
96 if (mProgram == null || inputFormat.getTarget() != mTarget) { in process()
102 mProgram.process(input, output); in process()
119 mProgram.setHostValue("first", first); in updateParameters()
120 mProgram.setHostValue("second", second); in updateParameters()
DFlipFilter.java42 private Program mProgram; field in FlipFilter
65 mProgram = shaderProgram; in initProgram()
78 if (mProgram != null) { in fieldPortValueUpdated()
90 if (mProgram == null || inputFormat.getTarget() != mTarget) { in process()
98 mProgram.process(input, output); in process()
114 ((ShaderProgram) mProgram).setSourceRect(x_origin, y_origin, width, height); in updateParameters()
DCropRectFilter.java48 private Program mProgram; field in CropRectFilter
70 mProgram = shaderProgram; in initProgram()
82 if (mProgram != null) { in fieldPortValueUpdated()
100 if (mProgram == null || inputFormat.getTarget() != mTarget) { in process()
110 mProgram.process(input, output); in process()
131 ((ShaderProgram) mProgram).setSourceRect((float) mXorigin / mWidth, in updateSourceRect()
DDrawRectFilter.java60 private ShaderProgram mProgram; field in DrawRectFilter
82 mProgram = new ShaderProgram(context, mVertexShader, mFixedColorFragmentShader); in prepare()
120 mProgram.setHostValue("color", color); in renderBox()
121 mProgram.setAttributeValues("aPosition", vertexValues, 2); in renderBox()
122 mProgram.setVertexCount(4); in renderBox()
125 mProgram.beginDrawing(); in renderBox()
DSepiaFilter.java33 private Program mProgram; field in SepiaFilter
67 mProgram = shaderProgram; in initProgram()
87 if (mProgram == null || inputFormat.getTarget() != mTarget) { in process()
93 mProgram.process(input, output); in process()
106 mProgram.setHostValue("matrix", weights); in initParameters()
DImageStitcher.java40 private Program mProgram; field in ImageStitcher
105 if (mProgram == null) { in process()
106 mProgram = ShaderProgram.createIdentity(context); in process()
120 ((ShaderProgram) mProgram).setSourceRect(x0, y0, in process()
124 ((ShaderProgram) mProgram).setTargetRect(((float) outputOffsetX)/ mImageWidth, in process()
130 mProgram.process(input, mOutputFrame); in process()
DRotateFilter.java42 private Program mProgram; field in RotateFilter
67 mProgram = shaderProgram; in initProgram()
79 if (mProgram != null) { in fieldPortValueUpdated()
91 if (mProgram == null || inputFormat.getTarget() != mTarget) { in process()
112 mProgram.process(input, output); in process()
149 ((ShaderProgram) mProgram).setTargetRegion(quad); in updateParameters()
DFixedRotationFilter.java40 private ShaderProgram mProgram = null; field in FixedRotationFilter
68 if (mProgram == null) { in process()
69 mProgram = ShaderProgram.createIdentity(context); in process()
100 mProgram.setSourceRegion(sourceRegion); in process()
103 mProgram.process(input, output); in process()
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/ui/
DSurfaceTargetFilter.java71 private ShaderProgram mProgram; field in SurfaceTargetFilter
120 mProgram = ShaderProgram.createIdentity(context); in prepare()
121 mProgram.setSourceRect(0, 1, 1, -1); in prepare()
122 mProgram.setClearsOutput(true); in prepare()
123 mProgram.setClearColor(0.0f, 0.0f, 0.0f); in prepare()
173 mProgram.process(gpuFrame, mScreen); in process()
202 if (mScreenWidth > 0 && mScreenHeight > 0 && mProgram != null) { in updateTargetRect()
208 mProgram.setTargetRect(0, 0, 1, 1); in updateTargetRect()
213 mProgram.setTargetRect(0.5f - 0.5f / relativeAspectRatio, 0.0f, in updateTargetRect()
217 mProgram.setTargetRect(0.0f, 0.5f - 0.5f * relativeAspectRatio, in updateTargetRect()
[all …]
DSurfaceRenderFilter.java65 private ShaderProgram mProgram; field in SurfaceRenderFilter
112 mProgram = ShaderProgram.createIdentity(context); in prepare()
113 mProgram.setSourceRect(0, 1, 1, -1); in prepare()
114 mProgram.setClearsOutput(true); in prepare()
115 mProgram.setClearColor(0.0f, 0.0f, 0.0f); in prepare()
181 mProgram.process(gpuFrame, mScreen); in process()
234 if (mScreenWidth > 0 && mScreenHeight > 0 && mProgram != null) { in updateTargetRect()
240 mProgram.setTargetRect(0, 0, 1, 1); in updateTargetRect()
245 mProgram.setTargetRect(0.5f - 0.5f / relativeAspectRatio, 0.0f, in updateTargetRect()
249 mProgram.setTargetRect(0.0f, 0.5f - 0.5f * relativeAspectRatio, in updateTargetRect()
[all …]
/frameworks/native/services/surfaceflinger/tests/
DBufferGenerator.cpp212 glDetachShader(mProgram, mVertexShader); in ~Program()
213 glDetachShader(mProgram, mFragmentShader); in ~Program()
218 glDeleteProgram(mProgram); in ~Program()
233 mProgram = glCreateProgram(); in initialize()
234 glAttachShader(mProgram, mVertexShader); in initialize()
235 glAttachShader(mProgram, mFragmentShader); in initialize()
237 glLinkProgram(mProgram); in initialize()
240 glGetProgramiv(mProgram, GL_LINK_STATUS, &status); in initialize()
243 glGetProgramiv(mProgram, GL_INFO_LOG_LENGTH, &length); in initialize()
246 glGetProgramInfoLog(mProgram, length, nullptr, &log[0]); in initialize()
[all …]
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/videosrc/
DSurfaceTextureTarget.java88 private ShaderProgram mProgram; field in SurfaceTextureTarget
136 mProgram = ShaderProgram.createIdentity(context); in prepare()
137 mProgram.setSourceRect(0, 1, 1, -1); in prepare()
138 mProgram.setClearColor(0.0f, 0.0f, 0.0f); in prepare()
241 mProgram.process(gpuFrame, mScreen); in process()
268 if (mScreenWidth > 0 && mScreenHeight > 0 && mProgram != null) { in updateTargetRect()
278 mProgram.setTargetRect(0, 0, 1, 1); in updateTargetRect()
279 mProgram.setClearsOutput(false); in updateTargetRect()
287 mProgram.setClearsOutput(false); in updateTargetRect()
304 mProgram.setClearsOutput(true); in updateTargetRect()
[all …]

123