1. Daniel Nadeau
  2. HoloGraphLibrary
  3. Issues
Issue #30 resolved

BarGraph creates bitmap very slowly

Scott baar
created an issue

The line

Bitmap.createBitmap(getWidth(), getHeight(), Config.ARGB_8888);

in bargraph.java is used in the intermediary Canvas canvas before being drawn on the canvas ca from onDraw(Canvas ca). This was probably done in a noble effort to reduce overdraw. However, the createBitmap function, as well as the copyBitmap function i tried to mitigate this issue, all take a very long time, 25-40 ms on my galaxy s3 for a 200 px tall image. Drawing directly to the onDraw canvas therefore ends up being 10x faster.

Unless there is a compelling reason I'm not seeing, the graph should be drawn directly on Canvas ca.

Comments (2)

  1. Log in to comment