A common source of layout bugs we're seeing these days involves the
output of measureText() being fed into StaticLayout's constructor.
measureText() returns subpixel-accurate values, but StaticLayout only
takes integral bounds, resulting in the subpixel portion of the
bounds being truncated. This leaves StaticLayout with insufficient
space to layout the text that was just measured, causing all manner
of unexpected line breaks.
This could be causing issues elsewhere, as well. Until our text
pipeline is fully subpixel-perfect, it's best that measureText
guarantee that the value it returns will be sufficient to contain
the text, even if cast to int.
Cherry-pick of Ib84947f0d0a1229287f5b19b99e7efd40f5317f7
Bug: 8164205
Change-Id: I69795ba5770112c0a3d0e752158076a8d1646b1a
When provided with a new bitmap device the canvas will retain
certain information such as it's matrix and clip.
bug: 8167188
Change-Id: I20ac8a24eebc85fb7c147504a103ce9a95b530b3
bug:8037003
-Merges replay methods
-Bounds checking for DrawBitmapMesh, DrawRects and DrawDisplayList
-Use clip as bounds for otherwise unbounded draw operations
Clip-as-bounds is correct for drawColor and functor, but other draw
operations (pos text, text on path, and layers) still need true bounds
calculation
Change-Id: I5d5149d2c624f01e3fe46628bf156e835e69b9d5
# Via Android (Google) Code Review (1) and Victoria Lease (1)
* commit 'c69bce2e41c70da35e1b6a2ab5ec44469ab14c80':
fix argument mismatches in Paint JNI
Paint.getTextRunCursor() no longer has a "flags" argument on the Java
side. The native side, however, still had the argument, and was being
called with misaligned arguments, causing all manner of madcap fun.
Also, the version of Paint.getTextRunCursor() that took String as an
argument needed to lose the "flags" argument, as well, to prevent an
infinite loop in the CharSequence version of the function, which was
supposed to be calling the String version but was actually calling
itself.
Bug: 8201224
Change-Id: Iad0dabaf81185f29a082566cc64590f2ba9bc31c
This reverts commit 6c0307dd0aefe9a08794b155fc03ee60ebd14f25, reversing
changes made to a2cd828b749c444d55c2c41c7dbb85088ff94b9f.
Conflicts:
packages/SystemUI/res/values-sv/strings.xml
Change-Id: Ia178efe8b14751583d47b2826bfe3d3d5463dd2e
JNI doesn't let us pass down a NULL parameter array (from the usrData part
of our reflection). In this case, we simply clone our existing function, but
remove the offending array parameter.
Change-Id: Ib1d6e202f2a55ba8922eec3da5a93d8daa882250
This change actually fixes several bugs related to stride:
* copyFrom() needs to call the 2D or 1D version, depending on the dimensions
of the corresponding Allocation.
* Add an internal-only copy2DRangeFromUnchecked(), since we don't really
want to expose it as another public API (only via copyFromUnchecked()).
* Call the proper 1D/2D version in copyFromUnchecked() based on the
Allocation dimensions.
* Add Element checks to the "checked" copy2DRangeFrom() routines.
Change-Id: I690706d36884ee749bf90937c715855f6c07368c
# Via Android Git Automerger (4) and others
* commit '11f1c5b89a98cb6794f2b1f158b8c22e38af975f':
docs: fix renderscript links that currently require redirect
# Via Android Git Automerger (3) and others
* commit 'b3a57191e62e0c394ba4a3448770853a1fb7ac3b':
docs: fix renderscript links that currently require redirect
# Via Android (Google) Code Review (1) and Scott Main (1)
* commit '00f490844d89b146e5490204a5a483834950c489':
docs: fix renderscript links that currently require redirect
# Via Android (Google) Code Review (1) and Michael Jurka (1)
* commit 'c24b14481527e2f87ddb3a156b8217d32c645b10':
Don't mark recycled bitmaps as immutable