Reduce number of tiles for big images with openGL
Every call to glDrawArrays exchanges data between CPU
and GPU, keeping the number low allows for big images
to render quickly. This is important on systems that drop
stylus events to prevent jagged lines.
The calulation keeps the tile size to a minimum of 1,
this is ok on most cases. Also we avoid using the
MAX_TEXTURE_SIZE, as it also provokes some slowdown issues.
BUG:414025