3539 Commits

Author SHA1 Message Date
Aravind Akella
2f8b91449e Adding wakeup sensors, maxDelay to java SDK.
Change-Id: I6da09b146e2b1c90efea7faf40a0503a89542cb0
2014-05-24 02:01:39 +00:00
Ruben Brunk
94ecb5506a am a7c97c55: Merge "camera2: Move DngCreator to hardware/camera2." into lmp-preview-dev
* commit 'a7c97c552a280ed3a2ff3535a5085f8601f45820':
  camera2: Move DngCreator to hardware/camera2.
2014-05-24 00:30:06 +00:00
Ruben Brunk
0bfa56e766 Merge "camera2: Move DngCreator to hardware/camera2." into lmp-preview-dev 2014-05-24 00:25:59 +00:00
Chris Craik
cd3a824548 Merge "DO NOT MERGE Inspect SkShader to determine hw shader." into lmp-preview-dev 2014-05-23 23:21:49 +00:00
John Reck
d04d303e5d resolved conflicts for merge of 1f6c973b to master
Change-Id: I0d0a72f1d737fa80ac4c258c1f9fc52ef85724bd
2014-05-23 13:56:35 -07:00
John Reck
4967c18308 Merge "Bag of scheduling tweaks" into lmp-preview-dev 2014-05-23 20:43:36 +00:00
Igor Murashkin
e48fb064ac am 31771fd6: Merge "camera2: Refactor CameraMetadata.Key out into 3 key classes" into lmp-preview-dev
* commit '31771fd63b8d08207012c4877a08679fa9b9d539':
  camera2: Refactor CameraMetadata.Key out into 3 key classes
2014-05-23 20:13:38 +00:00
John Reck
a5dda645da Bag of scheduling tweaks
Bug: 15118640

 * Prevent over-stuffing the queue by dropping frames
 * Prevent double-drawing in one pulse by RT by deferring
   vsync registration until post-draw so that it catches
   the next vsync pulse instead of the current one
 * Bias vsync race condition towards the UI thread
 * Fix queueDelay to actually work

Change-Id: Ibf584258bd93ebcbba058bd976dc8b307f1c6155
2014-05-23 12:56:38 -07:00
Igor Murashkin
d6d65154e5 camera2: Refactor CameraMetadata.Key out into 3 key classes
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
2014-05-23 11:55:29 -07:00
Leon Scroggins III
0fa2bd699a DO NOT MERGE Inspect SkShader to determine hw shader.
cherry-pick of Iaa7189178bda1c55f96da044d2a9fa602ba36034

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: I2e7182b3fc28268e7ca82fac6780540b6b45365c
2014-05-23 11:50:38 -04:00
Michael Wright
4e8437387a Merge "Pack PointerCoords with BitSet." 2014-05-23 00:40:12 +00:00
Chris Craik
d490aa4260 Merge "Inspect SkShader to determine hw shader." 2014-05-23 00:03:46 +00:00
Ruben Brunk
b6079005ed camera2: Move DngCreator to hardware/camera2.
Bug: 15091253
Change-Id: Ibe2ee376436e5c796e33c0b782ea68278589f2e6
2014-05-22 22:57:11 +00:00
Leon Scroggins III
d1ad5e62fd Inspect SkShader to determine hw shader.
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
2014-05-22 14:46:59 -04:00
Paul Jensen
985086276f Merge "Implement bind-to-network functionality of android.net.Network." 2014-05-22 16:14:21 +00:00
Ruben Brunk
94520c7460 Merge "camera2: Add HAL1 compatibility shim skeleton." 2014-05-22 06:08:56 +00:00
Paul Jensen
3876495129 Implement bind-to-network functionality of android.net.Network.
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
2014-05-22 04:16:54 +00:00
Jesse Hall
9626f8203a opengl: Fix #include style in generated JNI code
Bug: 15028495
Change-Id: Iad98380264c349fddf3b88df0c3a997d94c84fc8
2014-05-21 21:04:20 -07:00
Jesse Hall
7ab63acdd0 opengl: Add GLES31 and GLES31Ext classes
Bug: 15028495
Change-Id: Ie967c1938060edb42864dd48efa668ae7bf5cd76
2014-05-21 21:04:20 -07:00
Chris Craik
b8fe2fcd71 Merge "Define light position (using new lighting spec) in Java" 2014-05-22 00:18:21 +00:00
Ruben Brunk
feb50af361 camera2: Add HAL1 compatibility shim skeleton.
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
2014-05-21 16:37:59 -07:00
Mathieu Chartier
304bbd287c Temporary fix for buffer overrun issue.
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
2014-05-21 15:14:02 -07:00
Chris Craik
797b95b26b Define light position (using new lighting spec) in Java
Also updates the relative shadow strengths.

Change-Id: I6cac7275d38df98aea9f0dda463cd7207102986a
2014-05-21 13:50:29 -07:00
Svetoslav Ganov
519c77b710 Switching to the final PDF rendering library
Change-Id: Id92674ce762af894a5c4b0df0f8e9a711131bccc
2014-05-21 12:43:51 -07:00
Ed Heyl
a5291466ea Fix the build: Revert "Switching to the final PDF rendering library"
This reverts commit e7a8f476ea3873941ace96751fa2d633c95b7c10.

Change-Id: I457e45b0a536bbde721a3355ed860b2363e36467
2014-05-21 19:21:06 +00:00
Svetoslav
89ff50cea8 Switching to the final PDF rendering library
Change-Id: I5bad4fc620378f3ca6b070bbaeee631f526b66c7
2014-05-21 10:40:42 -07:00
Michael Wright
cbf1486324 Pack PointerCoords with BitSet.
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
2014-05-20 13:51:06 -07:00
Mike Lockwood
304ebe60b2 Merge "USB: Fix race condition in acquiring global reference in UsbRequest JNI code" 2014-05-20 18:59:05 +00:00
Mike Lockwood
b2a4658a63 USB: Fix race condition in acquiring global reference in UsbRequest JNI code
Fixes bug https://code.google.com/p/android/issues/detail?id=59467

Change-Id: I8365e1be4eb0f1f2da49b658af677b590a80e382
2014-05-20 11:33:35 -07:00
Victoria Lease
49f0db3481 fix argument order in call to SkBlurDrawLooper constructor
This fixes all sorts of badness.

Bug: 15074512
Change-Id: I5e96983c58d19e0dc2d8fa61d1efa9dcff076ca1
2014-05-19 16:12:22 -07:00
Ruben Brunk
f967a5486a camera2: Plumb DngCreator to native library.
Change-Id: Ic58bf6cf5086808b503460ef8e451fc0d6f1f850
2014-05-16 23:25:51 -07:00
Eric Laurent
c5baa18806 Merge "AudioSystem: native to JAVA status translation" 2014-05-16 23:37:50 +00:00
Eric Laurent
bc11a696f6 AudioSystem: native to JAVA status translation
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
2014-05-16 15:50:42 -07:00
Alan Viverette
ad2f8e334f Update ripple behavior, use render thread animation
Change-Id: Ib6bc1e08b05d29606f452961963d58b8fc866746
2014-05-16 13:28:33 -07:00
Raph Levien
e517ce4563 Merge "Get rid of dirFlags log spam" 2014-05-16 18:59:03 +00:00
Raph Levien
b98de0dcd6 Get rid of dirFlags log spam
I was logging the BiDi flags for debugging, did not mean to commit this.

Change-Id: I0a89c68fe17562f2ed38843efacbaa310dca24fa
2014-05-16 11:50:50 -07:00
Jean-Michel Trivi
c40c0c9d9c Merge "AudioTrack JNI cleanup" 2014-05-16 16:04:00 +00:00
Chris Craik
c9ee304c91 Merge "Round rect outline clipping" 2014-05-16 00:37:29 +00:00
Chris Craik
deeda3d337 Round rect outline clipping
Change-Id: Iee9cf4f719f6f1917507b69189ad114fa365917b
2014-05-15 16:36:12 -07:00
Dianne Hackborn
0a3103e755 Merge "Battery stats more wake history, power save mode." 2014-05-15 21:57:27 +00:00
Dianne Hackborn
cbefd8dd2b Battery stats more wake history, power save mode.
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
2014-05-15 13:32:29 -07:00
Svetoslav
dbef65f1a1 Merge "Adding APIs to render PDF documents." 2014-05-15 20:15:06 +00:00
John Reck
a3d5d3ca11 Merge "Animator start value..." 2014-05-15 20:10:52 +00:00
Raph Levien
d93ef91861 Remove SkFloatToScalar in GLES20Canvas (Minikin)
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
2014-05-15 09:54:01 -07:00
John Reck
ff941dcd81 Animator start value...
Change-Id: Ifd35ed95a28c625086d7fa97764fe63ab4a997f1
2014-05-15 08:53:39 -07:00
Mike Reed
4c9355c35a Frameworks changes to support latest Skia (r14729)
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
2014-05-15 10:17:44 -04:00
Raph Levien
1044a8211d Merge "BiDi support for Minikin" 2014-05-15 02:11:48 +00:00
Raph Levien
9e2b288ba8 Merge "Proper refcounting for Minikin objects" 2014-05-15 02:03:48 +00:00
Raph Levien
018646adac Merge "Parsing of XML font configuration files for Minikin" 2014-05-15 02:03:34 +00:00
Raph Levien
2836c4722a Merge "Start of Minikin integration" 2014-05-15 02:03:05 +00:00