I'm not sure I got what you need, but if you just want to apply EmbossMaskFilter around some png letter with alpha channel, you can pretty much do this trick with
EmbossMaskFilter filter = new EmbossMaskFilter(new float[]{1, 1, 1}, 0.5f, 0.6f, 2f); Paint paintEmboss = new Paint(); paintEmboss.setMaskFilter(embossMaskFilter); Bitmap helperBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); Canvas helperCanvas = new Canvas(helperBitmap); Bitmap alpha = src.extractAlpha(); helperCanvas.drawBitmap(alpha, 0, 0, paintEmboss); alpha.recycle(); ... canvas.drawBitmap(helperBitmap, 0, 0, anyPaint);
You will never need all this code in 1 onDraw, because it creates many objects in memory. And src.extractAlpha(); creates a new bitmap every time. (Btw, I always extract an error from memory from your git project. Added mAlphaBitmap.recycle(); and it can at least load, but it still lags like hell)
So, I played with your git repository and got some results. Here is a demo and git repo of the first commit :

But then I realized that you do not need EmbossMaskFilter around letters, you need them around rectangles. And this can be done in much the same way. Here is how I did it:
- Create a new auxiliary static bitmap and canvas for the background of the album, like mAlphaBitmap
- In each picture, paintBitmaps () on the auxiliary bitmap. Solid color without alpha.
- Extract alpha from created bitmap like this
Bitmap alpha = helperCanvas.extractAlpha(); - Draw the selected alpha-bitmap image on the auxiliary paint medium with the embossing filter
helperCanvas.drawBitmap(alpha, 0, 0, paintEmboss); - In onDraw print helperBitmap with some alpha in front of the main bitmap.
Here is a screenshot without alpha (because itโs much easier to see the shapes this way) 
Below is the git version of this version: https://github.com/varren/AndroidEmbossMaskFilterForPng/blob/1d692d576e78bd434252a8a6c6ad2ee9f4c6dbd8/app/src/main/java/de/afarber/mytiles2/Myava
And here is the important part of the code that I changed in your project:
private static final EmbossMaskFilter filter = new EmbossMaskFilter(new float[]{1, 1, 1}, 0.5f, 0.6f, 2f); private static Canvas helperCanvas; private static Paint paintEmboss; public Canvas getHelperCanvas(int width, int height){ if (mAlphaBitmap == null) { mAlphaBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); helperCanvas = new Canvas(mAlphaBitmap); paintEmboss = new Paint(); paintEmboss.setColor(Color.BLACK); } return helperCanvas; } private void prepareBitmaps() { mCanvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR); helperCanvas = getHelperCanvas(mBitmap.getWidth(),mBitmap.getHeight()); helperCanvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR); paintEmboss.setMaskFilter(null); paintEmboss.setAlpha(255); for (SmallTile tile: mTiles) { if (!tile.visible) continue; helperCanvas.drawRect(tile.left,tile.top,tile.left + tile.width, tile.top + tile.height,paintEmboss); mCanvas.drawRect(tile.left, tile.top,tile.left + tile.width, tile.top + tile.height, mPaintGrad); tile.draw(mCanvas); } paintEmboss.setMaskFilter(filter); Bitmap alpha = mAlphaBitmap.extractAlpha(); helperCanvas.drawBitmap(alpha, 0, 0, paintEmboss); } protected void onDraw(Canvas canvas) {
And the last 3rd step I took is to move everything from onDraw to prepareBitmaps() , and the preliminary work is fine, but we have text destruction when resizing. so here is the source code for this step.
And here is some wonderful work the final decision . Moving all the paints with filters solved the problems with the preliminary preparation, but I think there are even better options for implementing this. As I said, I donโt know what you need, but this code pretty much creates Emboss around Bitmap
PS: cool effect when splitting and adding cells together
PS2: new EmbossMaskFilter(new float[] { 0f, 1f, 0.5f }, 0.8f, 3f, 3f); it will not look the same on different devices with different screen resolutions