Replace the Java variable with mRequestPremultiplied, to better
reflect what it represents. In both native and Java, the SkBitmap
is used as the decision maker of whether a Bitmap is premultiplied.
When changing other settings, mRequestedPremultiplied is used to
determine whether it should be premultiplied (if the new config/
hasAlpha-ness etc supports it).
ChooseFromColorProc now reads both the colortype (instead of the
deprecated Config) and alphatype on the SkBitmap. Same with
ChooseToColorProc. In the process, this caught a bug, where the
wrong procs were being used for Index8.
Replace instances of SkBitmap::Config with SkColorType where I
was already changing code.
Use the new versions of setConfig/allocPixels that take an SkImageInfo
as a parameter.
Document isPremultiplied's return value for ALPHA_8.
BUG:13618134
Change-Id: I91fc1f1e46e9294364b1af0ab4bdb37c68d7058e
bug:15283203
A View's outline is now managed by its outline provider. This means
the outline is automatically requeried when needed (e.g. drawable
updates or resize), with customizable querying behavior.
Also adds 'isFilled' property to outline, to be used for hinting
shadow overdraw avoidance.
Change-Id: Ie137548fa850f1ff7863ab2f660d05145c2ad11e
Adds a constructor that doesn't require a GLES texture name and sets
up the SurfaceTexture in detached mode.
Bug: 15616428
Change-Id: I375495f481bfbe43b3830ab7d124cef8f1be0ac6
This patch switches all text layout operations to use Minikin, removes
the USE_MINIKIN #ifdef, and deletes some of the code that was only used
in the old TextLayout path (although some more refactoring remains).
Change-Id: I51b5c4e2bb46cfd9d204c12b9f16f135c769f5b5
The Paint.getTextGlyphs() method was used for testing the old Arabic
shaper and is entirely obsolete. Note that this is the very last
dependency (other than some enums in the header) for the old TextLayout
code path.
Change-Id: I7b596f0c0942ed50987fc8e0478cd93e667f1f9e
Basically extended the ValueAnimator to support a new type: pathType.
Add the PathDataEvaluator internally to interpolate path data.
Update test to show the path morphing.
Change-Id: I89db0199cbc12e3041790a6115f3f50b80213cdb
Previous logic in GradientDrawable around rebuilding the gradient path
was incorrect, but it happened to work because of when it was called
(after ensureValidRect() in the draw() method). Further reliance on this
logic outside of the drawing cycle (in the new getOutline() method) caused
the side-effect to surface as we now clear the dirty flag without actually
rebuilding the gradient.
Fix avoids resetting the flag outside of ensureValidRect() where it belongs.
Issue #15508378 Quantum ui having issues with viewing comments on facebook app
Change-Id: Ia944d3de7e3c0920fed040188e8c1cc1bcce498d
Previously the dither attribute would be dropped when cloning a
gradient drawable from constant state. Also fixes ShapeDrawable
theme extraction.
BUG: 15754194
Change-Id: I3071f5b8236cfa6acb549627a3dfac0618518dbf
The existing implementation of drawPosText is broken in various subtle
ways, in any case doesn't work with Minikin. This patch just implements
it by drawing a separate run for each Unicode character, which should
have the least surprising results for complex scripts such as Khmer.
Part of b/11750374 Resolve TODO items for Minikin
Change-Id: I874ae3c163f0cbe3cdf0160564fab04305aed5aa
The test case is showing that AnimatedVectorDrawable is able to use path to
define time interpolator and object movement now.
Change-Id: If3c0418265d0fd762c8f5f0bb8c39cce3ad34ef3
This patch contains an implementation of drawTextOnPath for both
software and hardware Canvas using Minikin for text layout. One of the
steps for switching all remaining text operations to Minikin so the old
TextLayout and Skia fallback fonts mechanisms can be deleted.
Bug: 11750374 Resolve TODO items for Minikin
Change-Id: I06bfe74a101fa1dcdfc38f530f7194d71e522a85
The dirFlags and bidiFlags enums are distinct, and have different
meanings. The former is a determined direction for a run of text, while
the latter is a request for the bidi algorithm. They have been used
interchangeably, and this has caused some problems, notably running the
bidi algorithm needlessly when the direction for a run is already
determined.
This patch cleans up the confusion, by always naming each occurrence
explicitly "boolean isRtl" or "int bidiFlags" (the previous code often
just used "int flags", which added to the confusion), and converts
between the meanings when a function takes an isRtl argument but passes
it to another function expecting bidiFlags.
Fixes b/15089607 Clean up bidi flag mess
Change-Id: I410b6604376e853dd12c255e7f5a9d2b9a310dd9