This bug was affecting several third party applications. The bug was
introduced by an optimization that prevented the local clip to be
recomputed when needed.
Change-Id: I7b5c464db21b5ff1a7274af75a3a64d0e9d84772
- we want functions like isEmpty() to return true if NANs are
involved in the Rect
- also clean-up the intersect familly of calls
- minor cleanup in the int32_t Rect as well
These played a role in http://b/5331198.
Bug: 5331198
Change-Id: I5369725ab482e4b83da9f1bd4cee5256e5de75b2
Bug: 5327776
Currently LTE_FLOAT isn't even a valid partial order, let alone
a strict weak order as needed by binary search. Consequently,
KeyedVectors with keys whose types have operator< using LTE_FLOAT
sometimes find the wrong values!
This problem affects several graphics caches including the
TextLayoutCache.
(This is still not a total order because NaNs are not comparable
but hopefully we don't ever search for NaNs this way!)
Change-Id: Ic447a34c7d87f681ee81538f22a0937a039072dd
This change sets textures filtering to GL_NEAREST by default. GL_LINEAR
filtering is only used when textures are transformed with a scale or
a rotation. This helps save a couple of fps on some GPUs.
Change-Id: I1efaa452c2c79905f00238e54d886a37203a2ac1
Bug: 5062011
Previously, each GLES20DisplayList would hold onto an instance of
GLES20RecordingCanvas. In turn, each GLES20RecordingCanvas
held onto an SkWriter with a 16Kb buffer along with several other
objects. With one display list per view and hundreds of views,
the overhead could add up to a few megabytes.
Ensured that the GLES20RecordingCanvas is reset as soon as
the display list has been constructed, thereby promptly freeing
the 16Kb buffer.
Changed GLES20DisplayList so that it acquires a GLES20RecordingCanvas
from a pool as needed and recycles it when done.
Removed some dead code and cruft related to the construction of
GLES20Canvas objects in general. Some code was written with the
assumption that the underlying renderer object could change
behind the scenes or might be lazily constructed, but that isn't
actually the case so we can simplify things.
Removed an unnecessary weak reference from GLES20DisplayList
to the View. It isn't actually used anywhere.
Fixed a bug in GLES20DisplayList where isValid() would return
true while the display list was being recorded. This is incorrect
because the native display list might not actually exist. Worse,
even if the native display list does exist, it is stale and
potentially refers to old Bitmaps that have been GC'd (because the
mBitmaps list was cleared when recording started).
Change-Id: Ib12d5483688cb253478edeb0156d34c476c2566b
Debugging code attempted to delete a stack item.
Also, the flag fields weren't exactly clear, so rewrite it so it's
clear that kDebugMoreCaches is a combined flag.
Change-Id: If42b7f0f754919343301da5656aee5943cc9bd4a
When creating a display list, matrices are duplicated locally. They
were however never deleted, thus causing apps to slowly leak memory
(a matrix is about 40 bytes.)
Change-Id: Iac465b720d4c4c9b5ca3fce870c0c912c14a74ab
This method is invoked by TextureView.getBitmap() and failures must be
caught to avoid leaving the GL context in a potentially bad state.
Change-Id: I620de395ba1bc20154de58c81963223dc55cac78