We've a number of native functions in the text layout path that take
a bidiFlags argument. We've a number of callers of those functions
passing in SkPaint::Flags in that slot. This completely breaks text
directionality for the affected functions, as
SkPaint::kAntiAlias_Flag happens to share values with kBidi_RTL,
resulting in anti-aliased SkPaints measuring text as if it were RTL,
and non-anti-aliased SkPaints measuring text as if it were LTR,
regardless of the actual text directionality. Oops!
To address the issue, this commit replaces erroneous calls to
SkPaint.getFlags() with the value of Paint.mBidiFlags, and includes
the necessary plumbing to get that value where it needs to be.
Bug: 8471481
Change-Id: I2d04b70defed3130fc1ad13f4c9098f5fce4ffde
Drawables added to a view's Overlay will now cause the Overlay to
be invalidated via the normal drawable-invalidation mechanism. That is,
changes to any of the drawables in the overlay should cause invalidation of
the proper area of the overlay and thus the hostView, causing the appropriate
area to be redrawn.
Also, fixed a bug in drawable invalidation so that bounds changes will now
correctly invalidate both the old and new bounds areas.
Issue #8350510 Add APIs needed for future animation capabilities
Change-Id: Icae5fa0e420232ee17dc39be10084345bae8dbd8
- remove the ICU related methods and update the methods using the "reserved" argument
- update to CTS in another CL too
Change-Id: I5509736568c342d9d17bfeafc17951117ab5d3cc
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