ImageWriter clients could pass invalid or already
connected surface during initialization. Check the
status after trying to connect to the producer
interface and raise an exception if necessary.
Bug: 80086132
Test: Camera CTS
Change-Id: I46810885046a3b89ea18510574c22db27e812a9c
"ImageReader" and "ImageWriter" must pass information about the
specific buffer scaling mode.
Bug: 76022384
Test: Manual using application,
Camera CTS
Change-Id: I116f00cbf3b1487d8e44661e8fd15e2aa16e6e0d
"ImageReader" and "ImageWriter" must pass information about the
specific buffer transformation.
Currently only the "ImageReader" implementation of the
"android.media.Image" abstract classs will populate the
corresponding transformation, the remaining implementations will
use the default identity tranformation.
Bug: 75316204
Test: Manual using test application,
Camera CTS
Change-Id: If5c12134fbbef8cc20c3d369986ba613bc4f2cec
libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.
Test: modules using frameworks/base find headers
Bug: 63762847
Change-Id: I0f9f231acdebe460f279135462f43d3e32eff64d
See build/soong/README.md for more information.
Test: m -j checkbuild
Change-Id: I1817c75ee45537ca0d5fc40a035f94a3dfeccc11
Merged-In: I1817c75ee45537ca0d5fc40a035f94a3dfeccc11
(cherry picked from commit 76de4f6b4d09423b3a5d3603527ce79acae4ed32)
See build/soong/README.md for more information.
Test: m -j checkbuild
Change-Id: I1817c75ee45537ca0d5fc40a035f94a3dfeccc11
Merged-In: I1817c75ee45537ca0d5fc40a035f94a3dfeccc11
(cherry picked from commit 76de4f6b4d09423b3a5d3603527ce79acae4ed32)
With all the work under the hood of ImageReader/Writer in the last few
releases, this is much more straightforward to enable.
Only trick is to ensure that the Image detached from the ImageReader
correctly clears out its planes, if present.
Bug: 19962027
Test: Camera CTS still passes on angler, sailfish, ryu
Change-Id: Ic8a1f3e2f45cf15971d76e308a5af25eb2fd66f1
Also add an ImageWriter ctor to take additional arugment (format)
Test: ImageReader and Writer CTS tests
Bug: 32766711
Change-Id: I99e3862dd5b9a85c9df7879c14c84b68a35718ec
Below changes are included:
* Defer the buffer lock to Image#getPlanes call. This will save quite a bit
CPU cycles associated with lock buffer if the application doesn't really
want to access the data.
* Refactor the code: move some common code to some utility class, and use
one unified consumer (BufferItemConsumer) in ImageReader native implementation.
The code refactoring will also make it easier to support non-opaque image
attach/detach.
Bug: 22356918
Bug: 19962027
Change-Id: I4fb865b0ea3deb6650afc64c32a5906f30e8ccbd
* Hook up the native allocation registration with ImageWriter, such that GC
can get some hint when clean up the large memory object.
* Close all pending images when closing ImageReader. This could avoid native
mem leaks for some bad app practice. For example, some apps may hold images
in background service when activity is paused/destroyed, which could cause
huge native memory leaks even ImageReader is closed.
* make Image close thread safe: it is possible the clients close the image
in listener thread and the client main thread.
* Some minor code refactor to reduce the code duplication.
Bug: 25088440
Change-Id: I37d22b52aeb8d2521bf9c702b0f54c05905473e0
Throw IllegalStateException when queueing or dequeueing an
image if the input surface is already abandoned by the consumer.
Also fix a crash when planes are not initialized when closing
ImageWriter.
Bug: 22279111
Change-Id: I8301920d64a53c45b29e947e52ff323733abbf16
The gralloc usage flags are an enum, which is backed by an
implementation defined type. Both gcc and clang are making this a long
long. All the values are hard coded to fit within 8 hex characters
though, so just make the cast.
Change-Id: I4a9778a24c2cbf7fb663371d208e30c4921e170d
Changes the call to IGBP::detachNextBuffer to return an
sp<GraphicBuffer> instead of an ANativeWindowBuffer*.
Bug: 20092217
Change-Id: I59d6acef7120de5040c6710aeecfa1633ec7f736
Attempting to access an Image after it is closed will result in an ISE.
Also fixed some minor doc issues.
Bug: 19872785
Change-Id: I91f037b2b2f243fcbd905d5a646b505bc9c10638
ImageWriter/Reader API change, including below changes
* Interface for Opaque ImageReader
* ImageWriter Interface and implementation
* Image class minor update to support ImageWriter opaque ImageReader
detach/attach interface are defined but yet to be implemented.
Change-Id: Ic7c0d2df73c80b1a81a7316d8c4556bf7703c309