@Override public void onDrawFrame(GL10 gl) { if (!mInitialized) { //Only need to do this once mEffectContext = EffectContext.createWithCurrentGlContext(); mTexRenderer.init(); loadTextures(); mInitialized = true; } if (mCurrentEffect != R.id.none) { //if an effect is chosen initialize it and apply it to the texture initEffect(); applyEffect(); } renderResult(); }
@Override public void onDrawFrame(GL10 gl) { if (!mInitialized) { //Only need to do this once mEffectContext = EffectContext.createWithCurrentGlContext(); init(); loadTextures(); mInitialized = true; } if (mEffectChanged) { initEffect(); applyEffect(); mEffectChanged = false; } renderResult(); }
@Override public void onDrawFrame(GL10 gl) { if (!mInitialized) { // Only need to do this once mEffectContext = EffectContext.createWithCurrentGlContext(); mTexRenderer.init(); loadTextures(); mInitialized = true; } if (mCurrentEffect != R.id.none) { // if an effect is chosen initialize it and apply it to the texture initEffect(); applyEffect(); } renderResult(); if (saveFrame) { saveBitmap(takeScreenshot(gl)); } }
/** * Constructor of <code>PhotoPhaseTextureManager</code> * * @param ctx The current context * @param effectCtx The current effect context * @param dispatcher The GLES dispatcher * @param requestors The number of requestors * @param screenDimensions The screen dimensions */ public PhotoPhaseTextureManager(final Context ctx, final Handler handler, final EffectContext effectCtx, GLESSurfaceDispatcher dispatcher, int requestors, Rect screenDimensions) { super(); mContext = ctx; mHandler = handler; mEffects = new Effects(ctx, effectCtx); mBorders = new Borders(ctx, effectCtx); mDispatcher = dispatcher; mScreenDimensions = screenDimensions; mDimensions = screenDimensions; // For now, use the screen dimensions as the preferred dimensions for bitmaps mSync = new Object(); mPendingRequests = new ArrayList<>(requestors); mPictureDiscoverer = new MediaPictureDiscoverer(mContext); // Run the media discovery thread mBackgroundTask = new BackgroundPictureLoaderThread(); mBackgroundTask.mTaskPaused = false; reloadMedia(false); }
/** * Method that update the effect context if the EGL context change * * @param effectCtx The new effect context */ public void updateEffectContext(final EffectContext effectCtx) { synchronized (mEffectsSync) { if (mEffects != null) { mEffects.release(); mEffects = null; } mEffects = new Effects(mContext, effectCtx); if (mBorders != null) { mBorders.release(); mBorders = null; } mBorders = new Borders(mContext, effectCtx); } emptyTextureQueue(true); }
/** * Constructor of <code>DoubleBorder</code>. * * @param ctx The effect context * @param name The effect name */ public DoubleBorder(EffectContext ctx, String name) { super(ctx, DoubleBorder.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mWidthHandle = GLES20.glGetUniformLocation(mProgram[0], "w"); GLESUtil.glesCheckError("glGetUniformLocation"); mHeightHandle = GLES20.glGetUniformLocation(mProgram[0], "h"); GLESUtil.glesCheckError("glGetUniformLocation"); mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], STRENGTH_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); mStrengthHandle2 = GLES20.glGetUniformLocation(mProgram[0], STRENGTH_PARAMETER2); GLESUtil.glesCheckError("glGetUniformLocation"); mColorHandle = GLES20.glGetUniformLocation(mProgram[0], COLOR_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * Constructor of <code>DoubleJoinedBorder</code>. * * @param ctx The effect context * @param name The effect name */ public DoubleJoinedBorder(EffectContext ctx, String name) { super(ctx, DoubleJoinedBorder.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mWidthHandle = GLES20.glGetUniformLocation(mProgram[0], "w"); GLESUtil.glesCheckError("glGetUniformLocation"); mHeightHandle = GLES20.glGetUniformLocation(mProgram[0], "h"); GLESUtil.glesCheckError("glGetUniformLocation"); mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], STRENGTH_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); mStrengthHandle2 = GLES20.glGetUniformLocation(mProgram[0], STRENGTH_PARAMETER2); GLESUtil.glesCheckError("glGetUniformLocation"); mColorHandle = GLES20.glGetUniformLocation(mProgram[0], COLOR_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * Constructor of <code>RoundedBorder</code>. * * @param ctx The effect context * @param name The effect name */ public ElegantBorder(EffectContext ctx, String name) { super(ctx, ElegantBorder.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mWidthHandle = GLES20.glGetUniformLocation(mProgram[0], "w"); GLESUtil.glesCheckError("glGetUniformLocation"); mHeightHandle = GLES20.glGetUniformLocation(mProgram[0], "h"); GLESUtil.glesCheckError("glGetUniformLocation"); mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], STRENGTH_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); mColorHandle = GLES20.glGetUniformLocation(mProgram[0], COLOR_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); mBgColorHandle = GLES20.glGetUniformLocation(mProgram[0], BGCOLOR_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * コンストラクタ * GLコンテキスト内で生成すること * @param effect_context */ public MediaEffect(final EffectContext effect_context, final String effectName) { mEffectContext = effect_context; final EffectFactory factory = effect_context.getFactory(); if (TextUtils.isEmpty(effectName)) { mEffect = null; } else { mEffect = factory.createEffect(effectName); } }
protected Effect getEffect(String name) { Effect effect = null; if (context == null) { context = EffectContext.createWithCurrentGlContext(); } effect = context.getFactory().createEffect(name); effect.setParameter("tile_size", DEFAULT_TILE_SIZE); effects.put(this, effect); return effect; }
@Override public void onDrawFrame(GL10 gl10) { if(effectContext==null) { effectContext = EffectContext.createWithCurrentGlContext(); } if(effect!=null){ effect.release(); } if(null == effectType){ effectType = EffectFactory.EFFECT_DOCUMENTARY; } grayScaleEffect(effectType); square.draw(textures[1]); }
@Override public void onSurfaceCreated(GL10 gl, EGLConfig config) { TypedValue a = new TypedValue(); getContext().getTheme().resolveAttribute(android.R.attr.colorBackground, a, true); if (a.type >= TypedValue.TYPE_FIRST_COLOR_INT && a.type <= TypedValue.TYPE_LAST_COLOR_INT) { mBackgroundColor = new GLColor(a.data); } else { mBackgroundColor = new GLColor(Color.WHITE); } // We have a 2d (fake) scenario, disable all unnecessary tests. Deep are // necessary for some 3d effects GLES20.glDisable(GL10.GL_DITHER); GLESUtil.glesCheckError("glDisable"); GLES20.glDisable(GL10.GL_CULL_FACE); GLESUtil.glesCheckError("glDisable"); GLES20.glEnable(GL10.GL_DEPTH_TEST); GLESUtil.glesCheckError("glEnable"); GLES20.glDepthMask(false); GLESUtil.glesCheckError("glDepthMask"); GLES20.glDepthFunc(GLES20.GL_LEQUAL); GLESUtil.glesCheckError("glDepthFunc"); // Recreate the effect contexts recycle(); synchronized (mLock) { mEffectContext = EffectContext.createWithCurrentGlContext(); mEffectsFactory = new Effects(mContext, mEffectContext); mBordersFactory = new Borders(mContext, mEffectContext); recreateContext(); boolean singleTexture = mTransitionType.equals(Transitions.TRANSITIONS.NO_TRANSITION); mTextureManager = new SimpleTextureManager(mContext, mEffect, mBorder, singleTexture); mTransition = Transitions.createTransition(mContext, mTextureManager, mTransitionType); } mRecycled = false; }
/** * Constructor of <code>Effects</code> * * @param effectContext The current effect context */ public Effects(Context context, EffectContext effectContext) { super(); mCachedEffects = new HashMap<>(); mEffectContext = effectContext; mContext = context; }
/** * Constructor of <code>BlurEffect</code>. * * @param ctx The effect context * @param name The effect name */ public BlurEffect(EffectContext ctx, String name) { super(ctx, BlurEffect.class.getName()); init(new String[]{H_VERTEX_SHADER, V_VERTEX_SHADER}, new String[]{FRAGMENT_SHADER, FRAGMENT_SHADER}); // Parameters mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], "strength"); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * Constructor of <code>CrossHatchingEffect</code>. * * @param ctx The effect context * @param name The effect name */ public FrostedEffect(EffectContext ctx, String name) { super(ctx, FrostedEffect.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], "strength"); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * Constructor of <code>ToonEffect</code>. * * @param ctx The effect context * @param name The effect name */ public ToonEffect(EffectContext ctx, String name) { super(ctx, ToonEffect.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mWidthHandle = GLES20.glGetUniformLocation(mProgram[0], "w"); GLESUtil.glesCheckError("glGetUniformLocation"); mHeightHandle = GLES20.glGetUniformLocation(mProgram[0], "h"); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * Constructor of <code>PixelateEffect</code>. * * @param ctx The effect context * @param name The effect name */ public SwirlEffect(EffectContext ctx, String name) { super(ctx, SwirlEffect.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], "strength"); GLESUtil.glesCheckError("glGetUniformLocation"); mWidthHandle = GLES20.glGetUniformLocation(mProgram[0], "w"); GLESUtil.glesCheckError("glGetUniformLocation"); mHeightHandle = GLES20.glGetUniformLocation(mProgram[0], "h"); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * An abstract constructor of <code>Effect</code> to follow the rules * defined by {@link EffectFactory}. * * @param ctx The effect context * @param name The effect name */ public PhotoPhaseEffect(EffectContext ctx, String name) { super(); mName = name; // Stand on MCA identity effect for the initialization work EffectFactory effectFactory = ctx.getFactory(); mIdentityEffect = effectFactory.createEffect(MCA_IDENTITY_EFFECT); }
/** * Constructor of <code>NoiseEffect</code>. * * @param ctx The effect context * @param name The effect name */ public NoiseEffect(EffectContext ctx, String name) { super(ctx, NoiseEffect.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], "strength"); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * Constructor of <code>ToonEffect</code>. * * @param ctx The effect context * @param name The effect name */ public SobelEffect(EffectContext ctx, String name) { super(ctx, SobelEffect.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mWidthHandle = GLES20.glGetUniformLocation(mProgram[0], "w"); GLESUtil.glesCheckError("glGetUniformLocation"); mHeightHandle = GLES20.glGetUniformLocation(mProgram[0], "h"); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * Constructor of <code>ScanlinesEffect</code>. * * @param ctx The effect context * @param name The effect name */ public ScanlinesEffect(EffectContext ctx, String name) { super(ctx, ScanlinesEffect.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mFrequencyHandle = GLES20.glGetUniformLocation(mProgram[0], "frequency"); GLESUtil.glesCheckError("glGetUniformLocation"); mOffsetHandle = GLES20.glGetUniformLocation(mProgram[0], "offset"); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * Constructor of <code>BlurEffect</code>. * * @param ctx The effect context * @param name The effect name */ public DoFEffect(EffectContext ctx, String name) { super(ctx, DoFEffect.class.getName()); init(new String[]{H_VERTEX_SHADER, V_VERTEX_SHADER}, new String[]{FRAGMENT_SHADER, FRAGMENT_SHADER}); // Parameters mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], "strength"); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * Constructor of <code>HorizontalFilmBorder</code>. * * @param ctx The effect context * @param name The effect name */ public HorizontalFilmBorder(EffectContext ctx, String name) { super(ctx, HorizontalFilmBorder.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mWidthHandle = GLES20.glGetUniformLocation(mProgram[0], "w"); GLESUtil.glesCheckError("glGetUniformLocation"); mHeightHandle = GLES20.glGetUniformLocation(mProgram[0], "h"); GLESUtil.glesCheckError("glGetUniformLocation"); mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], STRENGTH_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); mColorHandle = GLES20.glGetUniformLocation(mProgram[0], COLOR_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * Constructor of <code>DoubleJoinedBorder</code>. * * @param ctx The effect context * @param name The effect name */ public InsetBorder(EffectContext ctx, String name) { super(ctx, InsetBorder.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mWidthHandle = GLES20.glGetUniformLocation(mProgram[0], "w"); GLESUtil.glesCheckError("glGetUniformLocation"); mHeightHandle = GLES20.glGetUniformLocation(mProgram[0], "h"); GLESUtil.glesCheckError("glGetUniformLocation"); mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], STRENGTH_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); mColorHandle = GLES20.glGetUniformLocation(mProgram[0], COLOR_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * Constructor of <code>VerticalFilmBorder</code>. * * @param ctx The effect context * @param name The effect name */ public VerticalFilmBorder(EffectContext ctx, String name) { super(ctx, VerticalFilmBorder.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mWidthHandle = GLES20.glGetUniformLocation(mProgram[0], "w"); GLESUtil.glesCheckError("glGetUniformLocation"); mHeightHandle = GLES20.glGetUniformLocation(mProgram[0], "h"); GLESUtil.glesCheckError("glGetUniformLocation"); mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], STRENGTH_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); mColorHandle = GLES20.glGetUniformLocation(mProgram[0], COLOR_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * Constructor of <code>Borders</code> * * @param effectContext The current effect context */ public Borders(Context context, EffectContext effectContext) { super(); mCachedBorders = new HashMap<>(); mEffectContext = effectContext; mContext = context; }
/** * Constructor of <code>SimpleBorder</code>. * * @param ctx The effect context * @param name The effect name */ public SimpleBorder(EffectContext ctx, String name) { super(ctx, SimpleBorder.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mWidthHandle = GLES20.glGetUniformLocation(mProgram[0], "w"); GLESUtil.glesCheckError("glGetUniformLocation"); mHeightHandle = GLES20.glGetUniformLocation(mProgram[0], "h"); GLESUtil.glesCheckError("glGetUniformLocation"); mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], STRENGTH_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); mColorHandle = GLES20.glGetUniformLocation(mProgram[0], COLOR_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * Constructor of <code>RoundedBorder</code>. * * @param ctx The effect context * @param name The effect name */ public RoundedBorder(EffectContext ctx, String name) { super(ctx, RoundedBorder.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mWidthHandle = GLES20.glGetUniformLocation(mProgram[0], "w"); GLESUtil.glesCheckError("glGetUniformLocation"); mHeightHandle = GLES20.glGetUniformLocation(mProgram[0], "h"); GLESUtil.glesCheckError("glGetUniformLocation"); mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], STRENGTH_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); mColorHandle = GLES20.glGetUniformLocation(mProgram[0], COLOR_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * Constructor of <code>SimpleBorder</code>. * * @param ctx The effect context * @param name The effect name */ public SquaresBorder(EffectContext ctx, String name) { super(ctx, SquaresBorder.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mWidthHandle = GLES20.glGetUniformLocation(mProgram[0], "w"); GLESUtil.glesCheckError("glGetUniformLocation"); mHeightHandle = GLES20.glGetUniformLocation(mProgram[0], "h"); GLESUtil.glesCheckError("glGetUniformLocation"); mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], STRENGTH_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); mColorHandle = GLES20.glGetUniformLocation(mProgram[0], COLOR_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * An abstract constructor of <code>Border</code> to follow the rules * defined by {@link EffectFactory}. * * @param ctx The effect context * @param name The effect name */ public Border(EffectContext ctx, String name) { super(); mName = name; mColor = new GLESUtil.GLColor(1, 0, 0, 0); mBgColor = new GLESUtil.GLColor(1, 0, 0, 0); // Stand on MCA identity effect for the initialization work EffectFactory effectFactory = ctx.getFactory(); mIdentityEffect = effectFactory.createEffect(MCA_IDENTITY_EFFECT); }
/** * Constructor of <code>RoundedSquaresBorder</code>. * * @param ctx The effect context * @param name The effect name */ public RoundedSquaresBorder(EffectContext ctx, String name) { super(ctx, RoundedSquaresBorder.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mWidthHandle = GLES20.glGetUniformLocation(mProgram[0], "w"); GLESUtil.glesCheckError("glGetUniformLocation"); mHeightHandle = GLES20.glGetUniformLocation(mProgram[0], "h"); GLESUtil.glesCheckError("glGetUniformLocation"); mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], STRENGTH_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); mColorHandle = GLES20.glGetUniformLocation(mProgram[0], COLOR_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * Constructor of <code>DoubleJoinedBorder</code>. * * @param ctx The effect context * @param name The effect name */ public InsetSquaresBorder(EffectContext ctx, String name) { super(ctx, InsetSquaresBorder.class.getName()); init(VERTEX_SHADER, FRAGMENT_SHADER); // Parameters mWidthHandle = GLES20.glGetUniformLocation(mProgram[0], "w"); GLESUtil.glesCheckError("glGetUniformLocation"); mHeightHandle = GLES20.glGetUniformLocation(mProgram[0], "h"); GLESUtil.glesCheckError("glGetUniformLocation"); mStrengthHandle = GLES20.glGetUniformLocation(mProgram[0], STRENGTH_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); mColorHandle = GLES20.glGetUniformLocation(mProgram[0], COLOR_PARAMETER); GLESUtil.glesCheckError("glGetUniformLocation"); }
/** * {@inheritDoc} */ @Override public void onSurfaceCreated(GL10 glUnused, EGLConfig config) { if (DEBUG) Log.d(TAG, "onSurfaceCreated [" + mInstance + "]"); mWidth = -1; mHeight = -1; mMeasuredHeight = -1; mStatusBarHeight = 0; mLastTransition = System.currentTimeMillis(); // We have a 2d (fake) scenario, disable all unnecessary tests. Deep are // necessary for some 3d effects GLES20.glDisable(GL10.GL_DITHER); GLESUtil.glesCheckError("glDisable"); GLES20.glDisable(GL10.GL_CULL_FACE); GLESUtil.glesCheckError("glDisable"); GLES20.glEnable(GL10.GL_DEPTH_TEST); GLESUtil.glesCheckError("glEnable"); GLES20.glDepthMask(false); GLESUtil.glesCheckError("glDepthMask"); GLES20.glDepthFunc(GLES20.GL_LEQUAL); GLESUtil.glesCheckError("glDepthFunc"); // Create an effect context if (mEffectContext != null) { mEffectContext.release(); } mEffectContext = EffectContext.createWithCurrentGlContext(); // Create the texture manager and recycle the old one if (mTextureManager == null) { // Precalculate the window size for the PhotoPhaseTextureManager. In onSurfaceChanged // the best fixed size will be set. The disposition size is simple for a better // performance of the internal arrays final Configuration conf = mContext.getResources().getConfiguration(); int orientation = mContext.getResources().getConfiguration().orientation; int w = (int) AndroidHelper.convertDpToPixel(mContext, conf.screenWidthDp); int h = (int) AndroidHelper.convertDpToPixel(mContext, conf.screenHeightDp); Rect dimensions = new Rect(0, 0, w, h); int cc = (orientation == Configuration.ORIENTATION_PORTRAIT) ? Preferences.Layout.getPortraitDisposition(mContext).size() : Preferences.Layout.getLandscapeDisposition(mContext).size(); // Recycle the current texture manager and create a new one recycle(); mTextureManager = new PhotoPhaseTextureManager( mContext, mHandler, mEffectContext, mDispatcher, cc, dimensions); } else { mTextureManager.updateEffectContext(mEffectContext); } // Schedule dispositions random recreation (if need it) scheduleDispositionRecreation(); }
/** * コンストラクタ * GLコンテキスト内で生成すること * * @param effect_context * @param flip_vertical * @param flip_horizontal */ public MediaEffectFlip(final EffectContext effect_context, final boolean flip_vertical, final boolean flip_horizontal) { super(effect_context, EffectFactory.EFFECT_FLIP); setParameter(flip_vertical, flip_horizontal); }
/** * コンストラクタ * GLコンテキスト内で生成すること * * @param effect_context * @param x The origin's x-value. between 0 and width of the image. * @param y The origin's y-value. between 0 and height of the image. * @param width The width of the cropped image. * between 1 and the width of the image minus xorigin. * @param height The height of the cropped image. * between 1 and the height of the image minus yorigin. */ public MediaEffectCrop(final EffectContext effect_context, final int x, final int y, final int width, final int height) { super(effect_context, EffectFactory.EFFECT_CROP); setParameter(x, y, width, height); }
/** * コンストラクタ * GLコンテキスト内で生成すること * * @param effect_context * @param first_color The first color tone. * representing an ARGB color with 8 bits per channel. * May be created using Color class. * @param second_color The second color tone. Integer, * representing an ARGB color with 8 bits per channel. * May be created using Color class. */ public MediaEffectDuoTone(final EffectContext effect_context, final int first_color, final int second_color) { super(effect_context, EffectFactory.EFFECT_DUOTONE); setParameter(first_color, second_color); }
/** * コンストラクタ * GLコンテキスト内で生成すること * * @param effect_context * @param bitmap The overlay bitmap. */ public MediaEffectBitmapOverlay(final EffectContext effect_context, final Bitmap bitmap) { super(effect_context, EffectFactory.EFFECT_BITMAPOVERLAY); setParameter(bitmap); }
/** * コンストラクタ * GLコンテキスト内で生成すること * * @param effect_context */ public MediaEffectDocumentary(final EffectContext effect_context) { super(effect_context, EffectFactory.EFFECT_DOCUMENTARY); }