When I moved this code here from external/skia, I accidentally changed
the lowercase 'm' to uppercase 'M'. Change back, to keep consistent
with SkXfermode and Xfermode.cpp.
Change-Id: I9694d29a22aaed7fcc8708f5962e3d2032297d08
We are removing it from Skia, so we need it here to support Android.
Add some small cleanups (remove comment that doesn't apply, convert
SK_OVERRIDE to override, remove 'virtual' keyword from methods with
'override' on them).
BUG:skbug.com/3329
Change-Id: I1f883082d6fb9d49b9c9ba9e1f50bd713eabf915
ICU, zlib & openssl export them using LOCAL_EXPORT_C_INCLUDE_DIRS.
The dependency on libc/dns/include was bogus and can be removed
trivially.
bug: 18581021
Change-Id: I4b8047ff0df1050ab48b61c0c886888b3f2f0c18
Make consistent use of core_jni_helpers for registration.
Translate some #ifdefs into const bools.
Change-Id: I37639aa053dd50f003a552cbd8550dddecc811c5
Turn on -Wall -Werror in core/jni. Fix warnings.
Clang TODO: For GCC we need to turn off Wunused-but-set-variable in
the GL bindings. However, Clang doesn't have that warning and thus
complains about an unknown pragma. It is necessary to make the
pragma #ifdef-ed on the compiler being GCC.
Change-Id: I14cab48d45c2771eef0432082356c47ed44a3d7f
On modern versions of Android running in AOT mode
FloatMath is slower than Math. Calls to Math.sqrt(),
etc. are replaced by intrinsics which can be as small
as a single CPU opcode.
When running in interpreted mode the new
implementation is unfortunately slower, but I'm
judging this acceptable and likely to be improved
over time. This change saves a small amount of native
code.
Example timings:
Mako AOSP AOT:
Method: Original / New / Direct call to Math
ceil: 596ns / 146.ns / 111ns
sqrt: 694ns / 56ns / 25ns
Mako AOSP interpreted:
Method: Original / New / Direct call to Math
ceil: 1900ns / 2307ns / 1485ns
sqrt: 1998ns / 2603ns / 1788ns
Other calls Mako AOT:
Method: Original / New
cos: 635ns / 270ns
exp: 566ns / 324ns
floor: 604ns / 150ns
hypot: 631ns / 232ns
pow: 936ns / 643ns
sin: 641ns / 299ns
The advice to use Math directly, in preference to
FloatMath, is still good. FloatMath will be deprecated
separately.
Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: If07fcbd78543d13bc6d75f9743f999860e8d58d7
On modern versions of Android running in AOT mode
FloatMath is slower than Math. Calls to Math.sqrt(),
etc. are replaced by intrinsics which can be as small
as a single CPU opcode.
When running in interpreted mode the new
implementation is unfortunately slower, but I'm
judging this acceptable and likely to be improved
over time. This change saves a small amount of native
code.
Example timings:
Mako AOSP AOT:
Method: Original / New / Direct call to Math
ceil: 596ns / 146.ns / 111ns
sqrt: 694ns / 56ns / 25ns
Mako AOSP interpreted:
Method: Original / New / Direct call to Math
ceil: 1900ns / 2307ns / 1485ns
sqrt: 1998ns / 2603ns / 1788ns
Other calls Mako AOT:
Method: Original / New
cos: 635ns / 270ns
exp: 566ns / 324ns
floor: 604ns / 150ns
hypot: 631ns / 232ns
pow: 936ns / 643ns
sin: 641ns / 299ns
The advice to use Math directly, in preference to
FloatMath, is still good. FloatMath will be deprecated
separately.
Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I8d1947d88b3c576643138b1df589fb9da7c1ab88
A user may request a subset of the document's pages to be printed.
In this case the expectation is that the resulting document does
not include not selected pages. While print serivices can do the
trimming themselves or the printer may do so, moving, potantually
many, redundant pages is inefficient. The real problem is when
saving to a PDF file where the saved file must not have the pages
the user did not select. This change adds shredding of undesired
pages from the PDF before saving it or passing it to a print service.
:
bug:17285994
Change-Id: I7deba535af99457bea3c118202314f0f3812e809
The idea is that extra paint parameters that only affect text layout
(not rendering) will go in android.Paint instead of going into
SkPaintOptionsAndroid. We will eventually move those out of SkPaint
too.
This is currently implemented in PaintImpl.cpp. Will be renamed when
current Paint.cpp that has JNI bits is moved to android_graphics_Paint.cpp.
Change-Id: Iba66c34dea5da503a13b9c864cb9f2211ac4ba7d
This introduces Canvas.h which is a pure virtual interface that
is intended to be used by both Skia and HWUI implementation. To help
stage this transition this CL only introduces the interface and Skia
implementation. The interface is not intended to be final and will
undoubtedly go through iterations in both style and location as we
look to introduce the HWUI implementation.
BUG:15672762
Change-Id: Ibaccdddb87d3b9358f4f0c1d317ead5282d4ee16
This reverts commit e28a5afee885cd69a5be5809f88116b601cb1a72.
Appears to cause memory corruption and random appearances of
chinese
Bug: 16343240
Bug: 16336642
Change-Id: Ife169181f40adff4b12948ed5f9d3a88dcec935b
This introduces Canvas.h which is a pure virtual interface that
is intended to be used by both Skia and HWUI implementation. To help
stage this transition this CL only introduces the interface and Skia
implementation. The interface is not intended to be final and will
undoubtedly go through iterations in both style and location as we
look to introduce the HWUI implementation.
BUG:15672762
Change-Id: Idefadede356f688edb8eb09b4a02aa01b4077f62
Dumps GL and CPU processing duration and frame timestamps to a file,
whenever the device is closed or the stream configuration is changed.
- Add PerfMeasurement class to legacy mode
- Wire up minimal usage to SurfaceTextureRenderer
Change-Id: Ic9d74ca26f706780b746175aa615c7aae4ae52e7
Add Process.killProcessGroup to interface between ActivityManager and
libprocessgroup.
Bug: 15313911
Change-Id: I5226a6d86153b863e30d936cf1c84e256f0d7ea5
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
Consists of 3 cherry-pick from changes by robertphillips@google.com
in master-skia:
-----------------------------------------------------------------------
New AndroidPicture wrapper class
Address code review comments & use new SkPictureRecorder::partialReplay
entry point
Addressing code review issues
Switch MakePartialCopy to makePartialCopy
Conflicts:
core/jni/android/graphics/Picture.cpp
Ie530ab15b3d549f0ecfb0ecc131f9144a7b72a91
Remove AndroidPicture from GraphicsJNI and split into .h and .cpp
-----------------------------------------------------------------------
Fix lingering legacy picture recording behavior
Address code review issues
Iaf870c2c400dbe70dc32d6d445574904f5ea718f
-----------------------------------------------------------------------
Update Android to new SkCanvas::drawPicture interface
As of Skia 9b14f26d (Alter SkCanvas::drawPicture (devirtualize,
take const SkPicture, take pointer) -
https://codereview.chromium.org/313613004) SkCanvas::drawPicture
has an alternate signature. The old entry point is deprecated.
I63395da61ecc3b58bfd2bc094752081f4b2f7535
-----------------------------------------------------------------------
Change-Id: I041133aeb5639abd853370e512acf93870f82aea
This is implemented by calling through to netd_client.
Included are functions to bind-to-network-for-process strictly for DNS to
facilitate startUsingNetworkFeature() reimplementation.
Change-Id: Ib22c7d02ea81d251bdfeeb0f64a47ce32eefcb1b
This adds basic support for running the Camera2 API on a device running
a camera HAL version lower than CAMERA_MODULE_API_VERSION_2_0.
This CL includes support for:
- N-way preview output streams
- N-way jpeg output streams
- CameraDevice emulation at the binder interface
- Basic camera metadata querying in the CameraManager
Bug: 15117269
Bug: 15116722
Change-Id: I8322955034c91f34bb348d4b28c2b774dbef38f6