3563 Commits

Author SHA1 Message Date
Derek Sollenberger
b2367cbf39 Merge "Update HWUI matrix API" 2014-05-30 15:34:34 +00:00
Raph Levien
ca672f2758 am 953fe800: Merge "Language and variant selection for Minikin" into lmp-preview-dev
* commit '953fe800caf1771217ff1e828d6aa93fbc16729c':
  Language and variant selection for Minikin
2014-05-29 22:38:34 +00:00
Raph Levien
2070252f98 Merge "Language and variant selection for Minikin" into lmp-preview-dev 2014-05-29 22:30:30 +00:00
John Reck
2cfc0e543f am 894bb170: Merge "Enable debug stuffs" into lmp-preview-dev
* commit '894bb1701ae15b87af1e3bfe865fe191081cc806':
  Enable debug stuffs
2014-05-29 22:27:12 +00:00
John Reck
aee470c023 Merge "Enable debug stuffs" into lmp-preview-dev 2014-05-29 22:23:41 +00:00
John Reck
fe5e7b7346 Enable debug stuffs
Bug: 14596762
 * dumpsys gfxinfo implemented
 * profile GPU visual_bars implemented

Change-Id: Icb948a9d5af5989b5615504d0d76ade64b93ef5b
2014-05-29 15:00:29 -07:00
Raph Levien
f9e3d31127 Language and variant selection for Minikin
This is the frameworks/base side of what's needed to support language
selection (especially Han unification, but also compact/elegant
selection for scripts that require more vertical space).

This is part of the fix for bug 15179652 "Japanese font isn't shown on
LMP".

Change-Id: I8f0f3aa9a1915659f8d0b590cf1c56529356049a
2014-05-29 14:21:24 -07:00
Derek Sollenberger
139088228f Update HWUI matrix API
1. more closely mirror Skia API by using const ref instead of ptrs
2. store SkMatrix in the drawOp instead of the linear allocation heap

Change-Id: I4b9f6f76b9f7d19325e29303d27b793679fd4823
2014-05-29 16:51:23 -04:00
Paul Jensen
2d6f265d00 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.

bug: 13885501

Change-Id: Ib22c7d02ea81d251bdfeeb0f64a47ce32eefcb1b
(cherry picked from commit dbf76f898f1f57eb74722358087c926d2f529bda)
2014-05-29 18:53:57 +00:00
Brian Carlstrom
245b8f054b am a2260c26: Merge "Move to dalvik.vm.lib.2 to force default to libart" into lmp-preview-dev
* commit 'a2260c26fc2499e1338a25f6f787a8d48ae48ddf':
  Move to dalvik.vm.lib.2 to force default to libart
2014-05-28 21:44:55 +00:00
Brian Carlstrom
3c1ff826e0 Move to dalvik.vm.lib.2 to force default to libart
Bug: 14298175
Change-Id: I8afa91bddfb6fec6b61c39286a16594eb947830e
2014-05-28 14:31:47 -07:00
Dan Stoza
00f535845b Merge "SurfaceFlinger: Add sourceCrop to screenshot" 2014-05-28 18:31:38 +00:00
John Reck
81d29b5f0c am 2d196d9f: Merge "Implement FlushCaches TODO" into lmp-preview-dev
* commit '2d196d9f9d4978fd0df80815e15012518be5ff18':
  Implement FlushCaches TODO
2014-05-28 16:05:06 +00:00
John Reck
45d0192929 Merge "Implement FlushCaches TODO" into lmp-preview-dev 2014-05-28 16:02:06 +00:00
Leon Scroggins III
8f8c085164 Merge "Remove call to deprecated SkBitmap::asImageInfo." 2014-05-27 20:42:44 +00:00
Leon Scroggins III
28408c2395 Remove call to deprecated SkBitmap::asImageInfo.
Instead, call SkBitmap::info().

Change-Id: Ib6e56c6e103afa5748405574043860449c33c467
2014-05-27 16:20:21 -04:00
Aravind Akella
1a68f24ab7 Merge "Adding wakeup sensors, maxDelay to java SDK." 2014-05-27 19:25:41 +00:00
Etienne Le Grand
ef0b88181e am 7326defe: am d7439d8c: Merge "Add confidence to the heart rate monitor definition and clarify onAccuracyChange" into klp-modular-dev
* commit '7326defe2de7ace86236bf0c5353fe0687c3f99c':
  Add confidence to the heart rate monitor definition and clarify onAccuracyChange
2014-05-27 18:10:52 +00:00
Etienne Le Grand
7326defe2d am d7439d8c: Merge "Add confidence to the heart rate monitor definition and clarify onAccuracyChange" into klp-modular-dev
* commit 'd7439d8c59e4c5a82ad94a5080436cc94f72e0be':
  Add confidence to the heart rate monitor definition and clarify onAccuracyChange
2014-05-27 18:06:13 +00:00
Leon Scroggins III
5f6aa983d6 Fix FILTER_BITMAP_FLAG regression in DrawFilter.
Skia removed the corresponding kFilterBitmapFlag, replacing it with a
separate function: setFilterLevel. If the flag is set, turn it into a
call to setFilterLevel.

Corresponds to changes in I2736f3f68683651574d79a169ff0ab563e0a469e to
fix Paint.setFlags().

BUG:15112859
Change-Id: I269cbd7a624e5dde5688305e1ba97075ba73f4fd
2014-05-27 12:15:32 -04:00
Etienne Le Grand
af80510e85 Add confidence to the heart rate monitor definition and clarify onAccuracyChange
Change-Id: I686d07dcd603bf3c3be3c1471de8be3b4e240855
2014-05-23 19:14:33 -07:00
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
e1628b7c6f Implement FlushCaches TODO
Change-Id: Id05429e98ffe0858275b32c41fb215c1d8d930b2
2014-05-23 15:40:14 -07: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
Dan Stoza
9890e341bf SurfaceFlinger: Add sourceCrop to screenshot
Adds a sourceCrop Rect parameter to screenshot commands, which allows
clients to capture only a portion of the screen instead of the whole
screen.

Bug: 15137922
Change-Id: I629447573cd34ffb96334cde7ba02490b9ea06d8
2014-05-23 09:19:02 -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