Currently we go slow when a small subrect of a large bitmap is drawn.
We only tile the in drawBitmap when the bitmap exceeds the max texture size and
we always use maximum sized tiles. Max texture size can be 16Kx16K or larger.
Drawing a small rect from a large bitmap may mean a 16Kx16K texture upload.
Even worse, it may be larger than our cache limit. This means every existing
texture gets purged and then the large texture itself is immediately purged
after it is drawn. It'll be reuploaded the next time it is used.
This change adds a new tiling conditiona. We will tile when:
1) The bitmap is large relative to the total cache size (at least half the cache
size)
2) The src rect is less than half the total bitmap
It will choose between max-texture-sized tiles and 1K * 1K tiles based on how
much smaller the total upload size is if 1K tiles were used.
Issue 5450048: [GPU] tile when large bitmap pased drawBitmap and only a small fraction is used
(Closed)
Created 13 years ago by bsalomon
Modified 13 years ago
Reviewers: reed1, TomH
Base URL: http://skia.googlecode.com/svn/trunk/
Comments: 2