460 Commits

Author SHA1 Message Date
Leon Scroggins III
f8d8777ddd Update framework to use M33 Skia. DO NOT MERGE
(These CLs are already in master.)

Bug: 13246311

This cherry-picks 7 CLs:

-----------------------------------------------------------------------

Remove calls to deprecated SkBitmap::setIsOpaque()

setIsOpaque() has been removed from ToT Skia.

Update setters for mIsPremultiplied and hasAlpha to take the
other into consideration.

cherry-pick from: I1b36b0b0ce7126031eb7b769b563c17dcd4b306a

-----------------------------------------------------------------------

Merge AssetStream with AssetStreamAdaptor.

Add enums to the constructor for AssetStreamAdaptor to choose the
different behaviors used by the (former) two different classes.

The old clients of AssetStream now get the following features of
AssetStreamAdaptor
- Debugging statements on error.
- The stream is an SkStreamRewindable.
- getLength() returns the correct value, and the old way of getting
  the length (read(NULL, 0)) is no longer implemented, since it is
  no longer used.
- isAtEnd() returns the correct value. ToT Skia makes it pure virtual,
  so some implementation is necessary.

cherry-pick from: I2a5395914e4f53830aaefee396556459083a1c56

-----------------------------------------------------------------------

Deprecate Android-specific SkPaint functions.

The following functions were problematic:
 const SkGlyph& getUnicharMetrics(SkUnichar, const SkMatrix*);
 const SkGlyph& getGlyphMetrics(uint16_t, const SkMatrix*);
 const void* findImage(const SkGlyph&, const SkMatrix*);

Replacing them with calls through SkGlyphCache solved a nasty crash
bug, so they have all been deprecated.

Bug: 11968757
cherry-pick from: Id746315d41aec5b211b78b172a883c2061130f08

-----------------------------------------------------------------------

pass SkGlyphCache into updateGlyphCache()

Doing so prevents us from double-locking the glyph cache, thereby
effectively locking ourselves out of reusing work that we'd just done.

Bug: 11968757
cherry-pick from: I5c552f2d0bbe30af2ce9054ba684e7da756a0d89

-----------------------------------------------------------------------

Updates to the Skia API needed to merge the WebView m33 version of Skia.

cherry-pick from: I0f63b53f2aae58871413b132742fc84138f069a3

Bugfix for screenshots (recent apps) due to incorrect rowBytes computation

bug: 12915192
cherry-pick from: I4d5fe2a2f75baf66099e0970fb646686a1992714

-----------------------------------------------------------------------

Fix bug in AndroidPixelRef where we did not store the correct imageInfo for a recycled bitmap.

cherry-pick from: I882483b78886e2f19fa4e43a86e69f5a82b3b7e5

-----------------------------------------------------------------------

Change-Id: Ie2b731a9f0795802418cfecddb4b684c92c64d33

Conflicts:
	core/jni/android/graphics/Bitmap.cpp
	core/jni/android/graphics/Graphics.cpp
	core/jni/android/graphics/Typeface.cpp
	graphics/java/android/graphics/Bitmap.java
2014-03-17 13:57:18 +00:00
Zhijun He
b7bfdc7cf7 Camera2: add metadata override
There are interface difference between managed and native side for some
metadata, like Face and JPEG format. we need override them when they are set/get
between native and managed sides.

Also fix some issues in the CameraMetadataTest.

Bug: 10406212

Change-Id: Ibd8be0415968445e711b3ea89f45e1edfa193ee2
2013-10-07 08:02:25 -07:00
Eino-Ville Talvala
e841d4e165 Camera2: Implement idle callbacks
- Rework camera callback binder interface
- Connect up idle, disconnect callbacks
- A few unit tests for shutter firing and idle use

Bug: 10549462
Change-Id: I8455a8a0561e366b7edeef6b101682be2ec44d79
2013-10-03 15:44:32 +00:00
Zhijun He
7b7a154026 Camera2: Fix Camera integration test deadlock
The problem was: when SurfaceTexture is used, test didn't acquire/release
images when they are produced, then it starves the producer and
cause deadlock. This change replaces SurfaceTexture with ImageReader, release
every image produced immediately.

Bug: 10360518
Change-Id: I9aabaee23013277c2da6f5825ac931bc10511fbc
2013-09-25 19:33:31 -07:00
Zhijun He
2001188be3 Camera2: Implement CameraManager#getCameraCharacteristics
Bug: 10904541
Bug: 10360518
Change-Id: I1da0b0319703fda46789f15a232e56ed1d928bc3
2013-09-25 13:54:25 -07:00
Igor Murashkin
68f40066c9 camera2: Rename CameraProperties to CameraCharacteristics
Bug: 10360518
Change-Id: I8667bdcc8c9528ace96dc675585f923004932641
2013-09-21 21:01:32 -07:00
Yu Shan Emily Lau
98d18bbc5e Merge "Fix media stress test." into klp-dev 2013-09-16 21:11:25 +00:00
Igor Murashkin
5cf86aa756 Merge "media: Update ImageReader to remove MaxImagesAcquiredException" into klp-dev 2013-09-16 21:02:32 +00:00
Igor Murashkin
26cb5fd5ff Merge "media: Update ImageReader APIs" into klp-dev 2013-09-16 20:19:15 +00:00
Yu Shan Emily Lau
c10b55a5e4 Fix media stress test.
1) Fix the CamcorderProifle initalization.
2) Insert 2 seconds after camera release.

Change-Id: Ib22f1922a917233f3d1020dc67de834e00fd0959
2013-09-16 12:50:12 -07:00
Glenn Kasten
6b2b845948 Merge "Miscellaneous fixes to SoundPool unit test" into klp-dev 2013-09-16 18:24:13 +00:00
Glenn Kasten
36317eac4b Merge "Stress test for AudioTrack shared memory bug" into klp-dev 2013-09-16 18:23:54 +00:00
Igor Murashkin
e3351f1942 media: Update ImageReader to remove MaxImagesAcquiredException
* acquiring images now throws IllegalStateException instead of
    MaxImagesAcquiredException

Bug: 10691447
Change-Id: I7ce68f990fb96703705b9181012a28633fea0b7a
2013-09-13 23:27:44 -07:00
Glenn Kasten
53d1537606 Miscellaneous fixes to SoundPool unit test
Explicitly specify API level 8, to permit same .apk be used with multiple platform versions.
In the priority test, use different samples for low and priority sounds,
    so it is possible to hear the difference.
Increase sleep times to make it easier to hear.
Only use Log.e for errors.
Add more logs and sleeps.
Pan more slowly.
Fix typos in logs about the test names.
Fix typo in pan comment.

Change-Id: Iebce07ca0cf3d6fa1b04faa8577faa1c6d25f8e6
2013-09-13 13:48:38 -07:00
Igor Murashkin
5e712064df media: Update ImageReader APIs
Bug: 10461757
Change-Id: Ic04e4c41965e3d417b29004f3f08e0cd56b8f4cb
2013-09-12 16:57:57 -07:00
Eino-Ville Talvala
70c2207c34 Camera2: Immutable metadata
Make all camera metadata immutable once created; requests are
created using CameraRequest.Builder.

- Separate CameraMetadata implementation from interface
- Implement deep copying of metadata
- Requests/results/properties have-a native implementation

Bug: 10360518
Change-Id: Ia6300c237219d39f70c63156fa9ca666d951a36e
2013-09-11 13:18:10 -07:00
Eric Laurent
d5da9de816 Stress test for AudioTrack shared memory bug
Changes in patch set 2:
 - add call to ProcessState::self()->startThreadPool()
 - remove dead code AudioSystem::get_audio_flinger
 - use simpler MemoryDealer isntead of MemoryHeapBase
 - AudioTrack now must be sp<> instead of raw pointer
 - use new constants from audio.h
 - change LOGx macros to ALOGx
 - fix file permission on Android.mk

Bug: 2801375
Change-Id: I899b08e0aa91deca328523f66f71e667011b4522
2013-09-11 12:48:17 -07:00
Timothy Knight
23c8809568 Camera2: Updated Rational for denom=0.
Handle NaN and INF using the same semantics as Java floats. No longer
throw an exception if a rational is constructed with a zero-denominator.

This commit is required for the ITS pdk app, since without it, the app
fails when it tries to deserialize rational values that are
(incorrectly) set to 0/0.

Bug: 10337323

Change-Id: I890ec2092f2945abc0f531fc46f9a7f5c71d2dbf
2013-09-04 16:58:58 +00:00
Eino-Ville Talvala
8ebd52bf41 Camera2: Add CameraDevice#flush()
- For quickly clearing out all pending and in-progress captures

Bug: 9758581
Change-Id: Ie4123fcc4d4b648a11d4a6257c531f07182bab39
2013-08-23 14:20:35 -07:00
Yu Shan Emily Lau
c8d0756776 Add the checking for the camcorder profile.
Not all the devie have camera. Only run the
recording test when the camcorder profile is
not null.

Change-Id: Ib38df363fe5e6049b72e97ae229964fb65882269
2013-08-19 19:03:26 -07:00
Eino-Ville Talvala
b6c38e9de1 Camera2: Remove redundant Keys classes
Also update tests accordingly

Bug: 10345522
Change-Id: I8c7d17cdfbda6faba09134745a96089bf1b70cb7
2013-08-19 20:37:37 +00:00
Ruben Brunk
66ef645144 Refactor CameraService to handle errors properly.
Bug: 10361136

- Connect calls now return status_t error flags.

Change-Id: Ibce9ab047348cfcade7e70a2ef03f5a833e13af8
2013-08-16 18:34:23 +00:00
Xia Wang
373673abd6 am 3a5e2013: am ebbcc18e: am 4032217e: Merge "Add option for video playback test to accept media source path." into jb-mr2-dev
* commit '3a5e2013a1296065a4674bdc43f357d3a352a6e9':
  Add option for video playback test to accept media source path.
2013-08-05 16:03:01 -07:00
Xia Wang
3a5e2013a1 am ebbcc18e: am 4032217e: Merge "Add option for video playback test to accept media source path." into jb-mr2-dev
* commit 'ebbcc18eaa8a69579fadae484630aa1ba447c031':
  Add option for video playback test to accept media source path.
2013-08-05 15:58:48 -07:00
Elliott Hughes
a81dcd03dc am b56f10aa: am 32c308a5: Merge "If media wants ASCII lowercasing, it needs to ask for it."
* commit 'b56f10aa66914aeb880c624ed6e938e1941ff820':
  If media wants ASCII lowercasing, it needs to ask for it.
2013-08-02 17:58:31 -07:00
Zhijun He
693e21d605 MediaFrameworkTest: Add camera capture result callback test
Also refactor the code to reduce code duplication.

Change-Id: I428ad73510043ebf9e62cd7841bfdb683c96f9bc
2013-08-02 15:24:45 -07:00
Elliott Hughes
dcb1a58cf9 If media wants ASCII lowercasing, it needs to ask for it.
http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html

Use toLowerCase(Locale.ROOT) if you want ASCII for machine consumption,
and use toLowerCase(Locale.getDefault()) if you want the user's locale's
casing rules for human consumption.

Bug: https://code.google.com/p/android/issues/detail?id=58359
Change-Id: Id9005a17e34217a81bef3b40031b9e2e6272f45d
2013-08-02 10:03:53 -07:00
Eino-Ville Talvala
2f1a2e423e Camera2 API: Rename package to android.hardware.camera2
Change-Id: I77b7939e199f9fe8e12a59393c24cff08097448c
2013-07-30 11:37:31 -07:00
Zhijun He
7f4d3147d1 camera2: Implement CameraDevice#waitUntilIdle
Also cleanup some logging/comments.

Change-Id: Id1a4dd853519802a2b74b8d2172095ba388329e6
2013-07-23 13:46:37 -07:00
Zhijun He
229019e6af MediaFrameworkTest: Fix camera unit test failure
Fix for testSubmitStreamingRequest failure

Change-Id: I2e22a56b3da90112a668c2185b05eb9288cde392
2013-07-22 18:08:30 -07:00
Igor Murashkin
3710db80d4 camera2 api: marshal rect, size, string for metadata
Change-Id: Iec2fd823bc92394da44abb32ca38a625d7638e3d
2013-07-19 12:04:48 -07:00
Igor Murashkin
d7bf1778df camera2: Implement CameraDevice#getCameraInfo
Bug: 9529161
Change-Id: Ie37d1e07bb8416cbb141f4d49e52337bf7236610
2013-07-15 13:37:08 -07:00
Igor Murashkin
b9dd637f83 camera2 api: Generate metadata keys and enums from XML
Change-Id: I9b04b5933c5922fc522e9216f4deebcd6fc24d78
2013-07-12 17:25:50 -07:00
Xia Wang
796c93b110 Add option for video playback test to accept media source path.
This allows the stress test to be able to streaming video over network.

Change-Id: Ie0089c1ba2a076c9c1325934643c2f22f2ca9866
2013-07-11 19:30:51 -07:00
Igor Murashkin
b519cc52ec camera2 api: Add CameraMetadata get/set support
* Add a Rational class
* Can get/set Key<T> where T is a primitive (or Rational)
* Can get/set Key<T> where T is a primitive array
* Can get/set Key<T> where T is an enum (synthetic constructor only)

Not implemented yet:
* When T is anything else, i.e. Rect, Size, etc

Bug: 9529161
Change-Id: I64438024a1e8327a38dd2672652626f0ffbb70e3
2013-07-11 13:06:56 -07:00
Igor Murashkin
70725500dc Initial camera device implementation
* Working streaming preview requests only
* Almost everything else returns empty objects that don't do anything

Bug: 9213377
Change-Id: Ie6f02a7c0952b0f5ebc41905425b15cae221f7d3
2013-06-26 13:19:45 -07:00
Igor Murashkin
e363fbb264 Partial CameraManager implementation
Bug: 9213377
Change-Id: I8f89fb94d7081a71b38e5cd0ad89116d219b4c33
2013-06-26 13:19:44 -07:00
Igor Murashkin
a858308ed2 Revert "Partial CameraManager implementation"
This reverts commit e473f7d8f96b5682141522378b761913192d8114.

Change-Id: I23e92ca2def0ebf507f6c782442a4698745bc926
2013-06-25 05:15:02 +00:00
Igor Murashkin
e473f7d8f9 Partial CameraManager implementation
Bug: 9213377
Change-Id: I29864a5d1f7971ed589d1ffaddeefbb703e34018
2013-06-24 17:41:09 -07:00
Marco Nelissen
2d2cd32cc7 Make MediaPlayer.invoke() public-and-hidden again
It's used in a bunch of other places in other repos that I don't
want to touch.

Change-Id: I6f2ec6f8066286de9b52499fc71f3f08953c3cb4
2013-06-14 09:47:27 -07:00
Marco Nelissen
85c28e8183 Forgot something
Change-Id: Ia579213303e79b282a7ba472b39576d4b160a739
2013-06-14 09:18:35 -07:00
Marco Nelissen
c2f9024b13 Fix build
We don't need a separate test for invoke() because there are other
tests that exercise it.

Change-Id: I8c8f3593e7e9eed3c53997453f0f66ba8374e79e
2013-06-14 09:14:28 -07:00
Igor Murashkin
cf88be6dc8 Merge "camera: Add Java binder proxies for some existing binder interfaces" 2013-06-11 20:45:19 +00:00
Igor Murashkin
4491d684f4 camera: Add Java binder proxies for some existing binder interfaces
Note that anything not in the AIDL interfaces, will NOT be magically
compatible if you just add it there. It probably requires a change in
frameworks/av/camera as well.

Bug: 9213377
Change-Id: I91d3efb755ed2e3ace139f83573f86efdccccd06
2013-06-11 11:36:38 -07:00
Jason Noguchi
8b6bbb58c8 am b809577f: am b318f7b9: Merge "Refactor of camera stress test to add camera test helper. Also add additional functional tests for: flash, exposure, white balance, and focus mode. Also add pairwise tests." into jb-mr2-dev
* commit 'b809577f46c44cd61e4f719b4cd810115bdcf367':
  Refactor of camera stress test to add camera test helper. Also add additional functional tests for: flash, exposure, white balance, and focus mode.  Also add pairwise tests.
2013-05-30 14:23:54 -07:00
Jason Noguchi
b318f7b900 Merge "Refactor of camera stress test to add camera test helper. Also add additional functional tests for: flash, exposure, white balance, and focus mode. Also add pairwise tests." into jb-mr2-dev 2013-05-30 01:23:48 +00:00
Jason Noguchi
c6cedc84f4 Refactor of camera stress test to add camera test helper. Also add
additional functional tests for: flash, exposure, white balance, and
focus mode.  Also add pairwise tests.

Slight refactor to add camera test helper and also additional
tests for: flash, exposure, white balance, and focus mode

Bug: 9174937

Change-Id: I3d26b545dc8ff972c8173066df59a2e572a837ef
2013-05-28 15:28:32 -07:00
Yu Shan Emily Lau
e0e1af0ac6 am 03367e29: am b830d527: Merge "Update test with CamercorderProfile video size." into jb-mr2-dev
* commit '03367e2971e095b819f789c999cf03f8b3eec7ae':
  Update test with CamercorderProfile video size.
2013-05-24 18:55:55 -07:00
Yu Shan Emily Lau
9c539e8511 Update test with CamercorderProfile video size.
Bug:9114681
Change-Id: Id8ac6e98849715d21cd4a983fc13935debea5e5f
2013-05-23 22:02:28 -07:00
Marco Nelissen
2b8ae6f521 am 68c666eb: am 804e618d: Fix build
* commit '68c666ebb75b7e87ee9773752165351482b49a08':
  Fix build
2013-05-10 12:46:42 -07:00