Before:
* CameraMetadata.Key<T>
After:
* CameraCharacteristics.Key<T>
* CaptureResult.Key<T>
* CaptureRequest.Key<T>
CameraMetadata#get has been removed (each metadata subclass has
its own #get now) due to java generic limitations (in particular
a type bound <T1<T2> extends Key<T2>> is an illegal bound).
CameraMetadataNative gets a new #dumpToLog function to dump the native
metadata to logcat.
Bug: 15091017
Change-Id: Ic56c54c0d184e209e20de374dc8a6d79527c209f
Instead of duplicating internal info about SkShader, inspect the
SkShader installed on the SkPaint.
core/java/android/view/GLES20Canvas.java:
Remove setupModifiers, nResetModifiers, and nSetupShader.
core/jni/android/graphics/Shader.cpp:
Remove calls to create/destroy the (previously) attached SkiaShader.
core/jni/android_view_GLES20Canvas.cpp:
Remove native code for setupShader and resetModifiers.
graphics/java/android/graphics/BitmapShader.java:
graphics/java/android/graphics/ComposeShader.java:
graphics/java/android/graphics/LinearGradient.java:
graphics/java/android/graphics/RadialGradient.java:
graphics/java/android/graphics/Shader.java:
graphics/java/android/graphics/SweepGradient.java:
Remove code keeping track of native SkiaShader.
libs/hwui/Caches.h:
Include Extensions.h.
libs/hwui/DeferredDisplayList.cpp:
Compare shaders on the paint, instead of on DrawModifiers.
libs/hwui/DisplayList.cpp:
libs/hwui/DisplayList.h:
Remove vector of SkiaShaders.
libs/hwui/DisplayListOp.h:
Access the SkShader on mPaint.
Remove SetupShaderOp and ResetShaderOp.
libs/hwui/DisplayListRenderer.cpp:
libs/hwui/DisplayListRenderer.h:
Remove resetShader, setupShader, refShader, and mShaderMap.
libs/hwui/FontRenderer.cpp:
Pass SkShader to setupDrawShader and setupDrawShaderUniforms.
libs/hwui/OpenGLRenderer.cpp:
libs/hwui/OpenGLRenderer.h:
Add LayerShader, a class inheriting from SkShader, to mimic the
behavior of SkiaLayerShader. Unlike SkiaLayerShader, it can be set on
the SkPaint so it can be inspected later.
Set a LayerShader instead of a SkiaLayerShader.
setupDrawShader and setupDrawShaderUniforms now inspect an SkShader
passed in.
Inspect SkShader instead of mDrawModifiers.mShader.
Remove resetShader and setupShader.
setupDrawColorUniforms now takes a boolean indicating whether there is
a shader.
Add an inline function for accessing the SkShader on an SkPaint.
In setupDrawBlending(Layer*, bool), do not check the shader (which will
never be set), but do check whether the color filter may change the
alpha (newly fixed behavior).
In setupDrawBlending(SkPaint, ...), check the SkShader and whether the
color filter affects alpha (the latter is new behavior).
libs/hwui/Renderer.h:
Remove pure virtual functions setupShader and resetShader.
libs/hwui/ResourceCache.cpp:
libs/hwui/ResourceCache.h:
Remove functions for refing/unrefing shaders.
libs/hwui/SkiaShader.cpp:
libs/hwui/SkiaShader.h:
Much of this code was redundant and has been removed.
Convert structs into class with nothing but static functions for
calling describe/setupProgram.
libs/hwui/TextureCache.cpp:
libs/hwui/TextureCache.h:
Use the SkPixelRef as the key to the bitmap Lru cache, since shader
inspection will provide a different SkBitmap pointer (though it will
hold the correct SkPixelRef with the correct generation ID).
tests/CanvasCompare/src/com/android/test/hwuicompare/DisplayModifier.java:
tests/CanvasCompare/src/com/android/test/hwuicompare/ResourceModifiers.java:
Update manual test to have more shaders: radial, sweep, compose,
invalid compose.
BUG:10650594
Change-Id: Iaa7189178bda1c55f96da044d2a9fa602ba36034
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
Allocating the bitmap using getSafeSize() causes problems since
getSafeSize64() < getSize() if there is a stride. Since everywhere
else uses getSize() it results in a lot of possible buffer overruns.
The fix reverts to using getSize instead of getSafeSize64.
Bug: 15089814
Change-Id: Ia471cf9715672d57bb7eb61bf735064aeb405ffe
The converstion from Java PointerCoords to native and then back again
was inconsistent. Using a BitSet for all of these operations keeps it
in sync.
Bug: 15000382
Change-Id: Id3a4558dae3ba3df7c4a9b3cb9d5580b957db8d5
Regroup status code translation from native to JAVA in AudioSystem.
The same codes will be used by AudioTrack, AudioRecord, AudioManager
and defined in a single place in AudioSystem.
Change-Id: I7d3f39f30e3bb8e53f33f4408bcb0672df8af42b
Add new option for battery stats to record the full wake
lock history, and recording the current power save mode.
Also add in some additional error constants when generating
Binder error exceptions.
And fix issue #14974572: Avoid repeating wakeup_reason at
the beginning of history
Change-Id: I7c1a2ab9569de216634f63d8ad69f1294ef1d235
A recent Skia change removed the SkFloatToScalar macro, but it was being
used in the Minikin case for the GSES20Canvas (enabled only on
USE_MINIKIN builds). This patch removes it.
Change-Id: Ib64fd347f5db94fa6f3b3f79957d55a38f0328c9
Required for a merge in external/skia
(I88b4d5cc81c357a8e223bd7860b1029590265200).
Includes two cherry-picks:
I456df543e1925b280f785c7b3bb81370157f9b09:
replace SkRasterizer* with NativeRasterizer* in JNI
I98adb200e023369d3ee75f21927fa98f23095a77:
Fix Paint.getFlags,setFlags wrt FILTER_BITMAP_FLAG
In Paint.setFlags(), turn FILTER_BITMAP_FLAG into a call to
SkPaint::setFilterLevel().
In Paint.getFlags(), read SkPaint::getFilterLevel() to determine
whether to include FILTER_BITMAP_FLAG in the result.
Fixes CTS tests with ToT Skia.
Change-Id: I2736f3f68683651574d79a169ff0ab563e0a469e
We need to render PDF documents for two main use cases. First,
for print preview. Second, for resterizing the PDF document by
a print service before passing it to a printer which does not
natively support PDF (most consumer ones).
Adding PDF rendering APIs improves guarantees for print quality
as the same library is used for preview and rasterization. Also
print vendors do not have to license third-party rendering engines.
Last but not least as the platform uses PDF as its main print
format it should also be able to natively render it.
Change-Id: I57004a435db147663cafea40cf3296465aba7f99
* Improve existing marshalers:
- each managed/native type combination can be queried marshal support
- marshalers can recursively call other marshalers for nested types
- support marshaling/unmarshaling generic classes by using super type tokens
* Add new marshalers for:
- ColorSpaceTransform
- MeteringRectangle
- Parcelable
- Range<T>
- ReprocessFormatsMap
- RggbChannelVector
- SizeF
- StreamConfiguration
- StreamConfigurationDuration
Batteries included; so are unit tests.
Bug: 14628001
Change-Id: I38d3e646ccfb3953898cd6f750c33e4097328482