0

In MirroringFrameLayout, the canvas passed to draw method is hardware accelerated but bmpBackedCanvas is not hardware accelerated.

Also it keep on calling draw method using preDrawListener, which forces redraw though nothing is changed on screen.

1.Is there any other way to invalidate the view when it changes instead of repeatedly posting invalidte() ?

2.Can bmpBackedCanvas be created as hardware accelerated (Layer type hardware)?

nmxprime
  • 1,506
  • 3
  • 25
  • 52

1 Answers1

0
  1. The technique used there is to overcome some limitations of WebView, which does not use the normal view rendering pipeline (at least on 4.3 and older — I assume the same problem occurs in 4.4+ with the new Chromium-based WebView). I have filed an enhancement request to make that behavior more configurable. However, this is fairly low on my development priority list at the moment.

  2. I am not aware that you can have a hardware-accelerated bitmap. If you can point me to a demonstration of how this works, I'd be happy to consider using it.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491