|
|
@ -110,6 +110,7 @@ public abstract class SampleCvViewBase extends SurfaceView implements SurfaceHol |
|
|
|
if (bmp != null) { |
|
|
|
if (bmp != null) { |
|
|
|
Canvas canvas = mHolder.lockCanvas(); |
|
|
|
Canvas canvas = mHolder.lockCanvas(); |
|
|
|
if (canvas != null) { |
|
|
|
if (canvas != null) { |
|
|
|
|
|
|
|
canvas.drawColor(0, android.graphics.PorterDuff.Mode.CLEAR); |
|
|
|
canvas.drawBitmap(bmp, (canvas.getWidth() - bmp.getWidth()) / 2, (canvas.getHeight() - bmp.getHeight()) / 2, null); |
|
|
|
canvas.drawBitmap(bmp, (canvas.getWidth() - bmp.getWidth()) / 2, (canvas.getHeight() - bmp.getHeight()) / 2, null); |
|
|
|
mFps.draw(canvas, (canvas.getWidth() - bmp.getWidth()) / 2, 0); |
|
|
|
mFps.draw(canvas, (canvas.getWidth() - bmp.getWidth()) / 2, 0); |
|
|
|
mHolder.unlockCanvasAndPost(canvas); |
|
|
|
mHolder.unlockCanvasAndPost(canvas); |
|
|
|