Addtion of synchronized to the methods triggers an API change.
Per council advice, pushing synch block into the function body.
Change-Id: Iaa395d9720bce499259ab750fe97149715e9f271
* Don't call context.getResources() redundantly when unnecessary;
similarly for Resources.getCompatibilityInfo()
* During bitmap creation, don't bother clearing to 0: it's unnecessary
because now that the raw bits are stored in a VM-side byte array, it
was cleared at initialization time. Also, don't use the sanity-
checking public entry point to erase to a color, because we know
that we're by definition in a "legal" path to erase to the initial
contents and don't need to incur the overhead of the (inappropriate)
sanity checking.
Change-Id: Idaca4d64fdecefd5d51337646ead32e1db510e02
When destroy is called shortly after creation, RS tries to set a surface on a partially destroyed context.
Change-Id: I7a382a701efde3264e5cd9b9a9b428ade5eb4a9a
Bug #5435653
saveLayer() can be extremely expensive on some GPU architectures. Avoiding
this call greatly improve the rendering performance of drawables with
strok + fill.
Change-Id: Ib414174ba05d5bad56d942b8e67ab784e7d60b9e
Some progress bars use AnimatedRotateDrawable, which suffered
from the same bug as AnimationDrawable (until a recent fix). The
code would not account for the left/top offset of the drawable in its view,
so it would rotate the drawable around the wrong center, causing it to
wobble and not get erased properly.
Change-Id: I3f34f797e595973d9eb1d952d92026c769c7ec0a
The difference is not obvious when compared to no hinting, and turning
off hinting has undesirable side effects because of the lack of sub-
pixel positioning when rendering text.
Change-Id: If2162ba079f68f33b33aed444e80036fdbf015bb
Make ProgressBar maintain aspect ratio on indeterminate progress drawables.
Make RotateDrawable tolerate left/top bounds != 0.
Change-Id: Iee03030caa98f72a8745f1ae3fb0de108ff663d4
The animation that runs when the NotificationPanel appears
used to start, then pause for a long time as the window/surface/layer
was created, then by the time it started to be visible, the animation
was over. This new approach delays starting the animation until the
layer has been drawn, so the animation can actually run a few frames after
that before finishing.
Change-Id: I998f01fd48cb762178021ad99e2b919b58a1ef3f
This change removes the ability to create a SurfaceTexture that is
capable of operating in synchronous-mode from the public APIs.
Bug: 5167959
Change-Id: I09995832bb9a5f5063a67ddc3e0e1ab124d4e893
We now do the screenshot in a separate process.
Also change the recents panel to not use hardware acceleration
on lower-end devices. And improve how it gets shown to not
load all data up-front which results in a long delay when you have
lots of recents.
Change-Id: Ia309a90f9939e5405758621b3f7114597bd0c02a
This removes the ParcelSurfaceTexture class since that functionality has been
folded into Surface.java. The change also updates the MediaPlayer to get rid
of setParcelSurfaceTexture() and modifies setTexture() to use the new Surface
functionality in order to simplify the code.
Change-Id: Iafa75ea3188263928128325d8a726786971b4de4
If returns true, the SurfaceTexture will be released by TextureView.
If returns false, the client needs to release the SurfaceTexture.
Change-Id: I946f71e337ad4170c168854ac27e028b82489c8c
- do not go to native if this is not needed (empty or null text)
- do expandMetricsFromPaint() in TextLine when needed instead of calling handleText()
with emty string just for doing expandMetricsFromPaint()
Change-Id: I1f566ccef66cbc990ebbb77ef149899119e37e84
- use correct 0 index for computing advance thru the char buffer (the buffer is created from TextUtils.getChars())
- udpate unit tests
Change-Id: Iaeb07658b79ecdf5e17395d55afb7c84965bb0fc