summaryrefslogtreecommitdiffstats
path: root/core/jni/android_view_Surface.cpp
Commit message (Collapse)AuthorAgeFilesLines
* GraphicsJNI Canvas cleanupJohn Reck2015-04-221-17/+6
| | | | Change-Id: I72e142986a8bc9f464c1951b6b5187919de3462e
* Rename native DisplayListRenderer to DisplayListCanvasChris Craik2015-04-201-1/+0
| | | | Change-Id: I33e6f8cc85da1e7da7ff7bf18d4ebde64222067a
* Revert "A bunch more cleanups"John Reck2015-04-171-6/+17
| | | | | | This reverts commit c294d128d03bc9a9982b273a82516c04583438cc. Change-Id: Id1ebb236950f7c36c6d86e1dd95566d3a200748d
* A bunch more cleanupsJohn Reck2015-04-141-17/+6
| | | | | | | | Switch a few places to using android::canvas instead of SkCanvas as well which eliminated some JNI Change-Id: I8f98b56442a06362b82b984cd1bd3a92398d8dbc
* ImageFormat: add PRIVATE formatZhijun He2015-03-301-1/+3
| | | | | Bug: 19865019 Change-Id: I1a9335fe1733a5b28d9cb20485b509fb216cb52b
* Cleanups & simplificationsJohn Reck2015-03-111-1/+1
| | | | Change-Id: I5ad5e3b8fe55b1528f2e20c63e5abe51d9e40ff1
* Add DEPTH image formats, support in ImageReaderEino-Ville Talvala2015-03-091-0/+94
| | | | | | | | | | - Add an explicit mapping between public ImageFormat/ PixelFormat enums and internal HAL format/dataspace. - Add DEPTH16 and DEPTH_POINT_CLOUD formats - Wire up mapping layer to ImageReader to support depth formats Change-Id: I8197eccef900cc91baddcfcb934ccd4d8c972eff
* Initial attempt at jank-tracking stat collectionJohn Reck2015-02-201-3/+7
| | | | | | Is a bit naive, perhaps overly aggressive, but sorta works Change-Id: I01a774e00dbe681439c02557d9728ae43c45ce50
* resolved conflicts for merge of 3fc5e3ca to lmp-mr1-dev-plus-aospAndreas Gampe2014-11-211-19/+19
|\ | | | | | | Change-Id: Id8286e5a4381315a6060251a8055b0f1d1a96019
| * Frameworks/base: Consistency in core/jniAndreas Gampe2014-11-211-19/+19
| | | | | | | | | | | | | | | | Make consistent use of core_jni_helpers for registration. Translate some #ifdefs into const bools. Change-Id: I37639aa053dd50f003a552cbd8550dddecc811c5
* | am 52e2b6f7: Merge "Update calls to IInterface::asBinder()"Marco Nelissen2014-11-171-2/+2
|\ \ | |/ | | | | | | * commit '52e2b6f79d44ff289c97653edea0548352c2f55b': Update calls to IInterface::asBinder()
| * Update calls to IInterface::asBinder()Marco Nelissen2014-11-171-2/+2
| | | | | | | | | | | | to use the new static version. Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
* | Wire up surface width/height to lockHardwareCanvasJohn Reck2014-11-131-0/+18
| | | | | | | | | | Bug: 18338026 Change-Id: I6c37774ef1312278ae81280561060662fef923fb
* | Add some free zoom to lockHardwareCanvasJohn Reck2014-10-231-0/+1
| | | | | | | | | | | | | | | | | | Bug: 18099195 Don't use EGL_SWAP_BUFFER_PRESERVED on surfaces that will never benefit. Also clean up some confusing naming Change-Id: I674ca64e0464a3282cff79e5ecd350d08f47c014
* | Surface:lockHardwareCanvasJohn Reck2014-10-211-0/+56
|/ | | | | | Bug: 17440886 Change-Id: I1f2d98c63ec1a2814c2258cf7e0096139263770a
* Merge "Surface: Add allocateBuffers to avoid render delay"Dan Stoza2014-06-271-0/+12
|\
| * Surface: Add allocateBuffers to avoid render delayDan Stoza2014-06-201-0/+12
| | | | | | | | | | | | | | | | | | | | This plumbs up a new call on the native Surface object that allows the client to request that BufferQueue pre-allocate all of the buffers that it might need for rendering. This hopefully prevents allocation delays during dequeuing and reduces jank. Bug: 11792166 Change-Id: Ibeaa7475492d4ac2bcacb107ef60c6240081d8b7
* | stop using (deprecated) SkBitmap::ConfigMike Reed2014-06-201-10/+14
|/ | | | Change-Id: Ic75b5fc6996578e9d95bd3a220439ec1541d7c3b
* Delete a local ref in getSurfaceAndy McFadden2014-06-111-0/+1
| | | | | | | | | | ANativeWindow_fromSurface() provides a native-only call path to android_view_Surface_getSurface(), so we need to clean up the local reference. Bug 14087233 Change-Id: I92aa5aa492c47a0642fdcb28c717ad7f874e1ad9
* Add a native Canvas wrapper.Florin Malita2014-05-301-6/+6
| | | | | | | | | | | | | | | | | Instead of storing a direct SkCanvas reference, Canvas now tracks an opaque native wrapper class. The native wrapper can be used to store additional info for emulating deprecated Skia features (at this point it only stores a canvas). Some notes: * all native handle -> SkCanvas conversions are routed through a handful of native utility methods. * safeCanvasSwap() refactored as a lower level setNativeBitmp() - which is what clients need. * removed unused get_thread_msec() (Canvas.cpp) Change-Id: I715a5a6f1e1621c1cfc1e510ae4f2ea15cf11114
* Encapsulate Canvas.mNativeCanvasFlorin Malita2014-05-061-22/+4
| | | | | | | | | | | | | | | | | Currently, the native canvas is accessed/manipulated from several unrelated classes. In order to facilitate SaveFlags emulation, this CL encapsulates the field and refactors its external users. Two main changes: * new getNativeCanvas() getter for use in Java-level clients. * JNI canvas swappers (GraphicsBuffers, Surface, TextureView & AssetAtlasService) are refactored based on the exising/equivalent safeCanvasSwap() Canvas method. Change-Id: I966bd4898f0838fb3699e226d3d3d51e0224ea97
* change Surface constructor arg to 64bitChong Zhang2014-01-291-1/+2
| | | | | | Bug: 12799017 Bug: 12799384 Change-Id: Ic16b4fa5394df38cee0378b6e00d1808b9c8cb94
* AArch64: Make graphics classes 64-bit compatibleAshok Bhat2014-01-281-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This a merger of two commits submitted to AOSP by the following authors: ashok.bhat@arm.com, david.butcher@arm.coma craig.barber@arm.com, kevin.petit@arm.com and marcus.oakland@arm.com Due to the very large number of internal conflicts, I have chosen to cherry-pick this change instead of letting it merge through AOSP because the merge conflict resolution would be very hard to review. Commit messages below: ================================================ AArch64: Make graphics classes 64-bit compatible Changes in this patch include [x] Long is used to store native pointers as they can be 64-bit. [x] Some minor changes have been done to conform with standard JNI practice (e.g. use of jint instead of int in JNI function prototypes) [x] AssetAtlasManager is not completely 64-bit compatible yet. Specifically mAtlasMap member has to be converted to hold native pointer using long. Added a TODO to AssetAtlasManager.java to indicate the change required. Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Craig Barber <craig.barber@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> ================================================================== AArch64: Use long for pointers in graphics/Camera For storing pointers, long is used in android/graphics/Camera class, as native pointers can be 64-bit. In addition, some minor changes have been done to conform with standard JNI practice (e.g. use of jint instead of int in JNI function prototypes) Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> =================================================================== Change-Id: Id5793fa0ebc17ee8b1eecf4b3f327977fdccff71
* Revert "AArch64: Make graphics classes 64-bit compatible"Narayan Kamath2014-01-271-34/+34
| | | | | | This reverts commit 18b4cbeedef21c1fa666a110a157bab66edff976. Change-Id: I0c52983a3ab1ace3ff743de546a43eca28e5cb0e
* AArch64: Make graphics classes 64-bit compatibleAshok Bhat2014-01-271-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This a merger of two commits submitted to AOSP by the following authors: ashok.bhat@arm.com, david.butcher@arm.coma craig.barber@arm.com, kevin.petit@arm.com and marcus.oakland@arm.com Due to the very large number of internal conflicts, I have chosen to cherry-pick this change instead of letting it merge through AOSP because the merge conflict resolution would be very hard to review. Commit messages below: ================================================ AArch64: Make graphics classes 64-bit compatible Changes in this patch include [x] Long is used to store native pointers as they can be 64-bit. [x] Some minor changes have been done to conform with standard JNI practice (e.g. use of jint instead of int in JNI function prototypes) [x] AssetAtlasManager is not completely 64-bit compatible yet. Specifically mAtlasMap member has to be converted to hold native pointer using long. Added a TODO to AssetAtlasManager.java to indicate the change required. Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Craig Barber <craig.barber@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> ================================================================== AArch64: Use long for pointers in graphics/Camera For storing pointers, long is used in android/graphics/Camera class, as native pointers can be 64-bit. In addition, some minor changes have been done to conform with standard JNI practice (e.g. use of jint instead of int in JNI function prototypes) Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> =================================================================== Change-Id: Ib3eab85ed97ea3e3c227617c20f8d213f17d4ba0
* Remove calls to deprecated SkBitmap::setIsOpaque()Leon Scroggins III2014-01-151-2/+4
| | | | | | | | | setIsOpaque() has been removed from ToT Skia. Update setters for mIsPremultiplied and hasAlpha to take the other into consideration. Change-Id: I1b36b0b0ce7126031eb7b769b563c17dcd4b306a
* Remove dependency on JNIHelp header side effects.Ruben Brunk2013-09-101-0/+1
| | | | | Bug: 10680559 Change-Id: I47870d6c48906e0a420c52b7bc5945ffe29c68a2
* Avoid crashing in unlockCanvasAndPostAndy McFadden2013-08-201-4/+11
| | | | | | | | | | | It's possible to update the native surface pointer while the surface is locked (via lockCanvas). This leads to a surprise when the surface is unlocked. Avoid the surprise by tracking the locked surface separately. Bug 10289713 Change-Id: I84346c952be859bbd91ceae7df07b91dabe0948e
* Clearly separate consumer and producer interfacesMathias Agopian2013-08-061-4/+3
| | | | | Bug: 9265647 Change-Id: Ic68e91788d0a05251e1d2fb9f9d4de403c7099bf
* get rid of HAL pixelformats 5551 and 4444Mathias Agopian2013-07-261-1/+0
| | | | Change-Id: I6a6c4c656d80280eb85f90f99f35721ffca285df
* get rid of PIXEL_FORMAT_A_8Mathias Agopian2013-07-251-1/+0
| | | | Change-Id: Ia750811f08ddebdd5818da211fd03d61b75f8e97
* update to new Consumer APIsMathias Agopian2013-07-161-3/+3
| | | | Change-Id: I8649f3add40e0aeeeb0396b98e2cb93312e8e990
* am f87d4ea7: am 17cf4e4d: Merge "Really make Surface thread-safe." into ↵Jeff Brown2013-05-031-35/+19
|\ | | | | | | | | | | | | jb-mr2-dev * commit 'f87d4ea77a6950c3d6d381347f2346c12bee25f4': Really make Surface thread-safe.
| * Really make Surface thread-safe.Jeff Brown2013-05-011-35/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were many places where the native object was being accessed improperly. Also some places where CloseGuard might not be acquired or released correctly or where the generation count might not be updated. Fixed them all. That said, Surface isn't intended to be used concurrently so please don't do it. This is only intended to make hard to find crashes less likely. Bug: 8328715 Change-Id: I981ef33425823e0fd7ad6b64443f2ec9b0c8335e
* | simplify Surface{View} dirty rect handlingMathias Agopian2013-04-181-33/+15
|/ | | | Change-Id: Ia4595fc1a8a62ca3f3db0f1e47e7e877d73fbfa0
* make Surface.java internal state thread-safeMathias Agopian2013-03-181-2/+12
| | | | | | | | | it's still incorrect to use Surface from different threads, however this shouldn't result to native crashes anymore. Bug: 8328715 Change-Id: I89ac5cc1218dc5aa0e35f8e6d4737879a442f0c6
* fix CloseGuard usage in SurfaceMathias Agopian2013-03-131-7/+0
| | | | | Bug: 8375415 Change-Id: I03e9f318c2ad586f4bd93b280557ada66121d275
* Try to keep the same native Surface object when reading a parcelMathias Agopian2013-03-131-4/+17
| | | | | | | | If the IGraphicBufferProducers are the same, it's really the same window, so we keep the same native object. Bug: 8322406 Change-Id: I96d55a90e6656a05d4e32ae22945226c350b5747
* remove uses of Surface in favor of IGraphicBufferProducerMathias Agopian2013-03-121-3/+10
| | | | Change-Id: I2ec590eed03c76a084ee6b0af362a3ca6476bf9f
* fix JNI use of incStrong/decStrongMathias Agopian2013-03-061-8/+11
| | | | Change-Id: Ia11b404dea483dc19bbc30f4d7bcff516655e180
* Restore the ability to track native Surface changesRomain Guy2013-02-281-3/+0
| | | | | | | | | | | Bug #8230990 ViewRootImpl needs to know when the native Surface objects changes to recreate the EGL surface. A recent refactoring in Surface broke the behavior of getGenerationId(). This simply restores the old behavior (every change increments the generation ID by 1.) Change-Id: Ife1df1ffb2ee7a373b8ebf2431192702ba10f344
* Fix SurfaceControl.setDisplaySurface() such that it accepts a null SurfaceMathias Agopian2013-02-251-1/+1
| | | | | | | also fix a typo that made us call the wrong Surface ctor Bug: 8225509 Change-Id: I23f92179b6003d4c3e0febb35166c1caeafa27f5
* am e4d3b06b: Merge "get rid of uses of getISurfaceTexture"Mathias Agopian2013-02-211-2/+2
|\ | | | | | | | | * commit 'e4d3b06b6ddb055739b8b2aa82ffc7840588253a': get rid of uses of getISurfaceTexture
| * get rid of uses of getISurfaceTextureMathias Agopian2013-02-191-2/+2
| | | | | | | | Change-Id: Ibb14327a2b7217994adaa91cc977b163a5509e4a
* | am 8d1a6af4: Merge "fix typo introduced in SurfaceTextureClient to Surface ↵Mathias Agopian2013-02-151-1/+1
|\ \ | |/ | | | | | | | | | | renaming" * commit '8d1a6af408d798dec46a8b1230b7327551fb8051': fix typo introduced in SurfaceTextureClient to Surface renaming
| * fix typo introduced in SurfaceTextureClient to Surface renamingMathias Agopian2013-02-151-1/+1
| | | | | | | | Change-Id: Iaf1ecc9f5b83a029067b278bc15180d68a113587
* | am ceec31b7: Merge changes I5a218ca1,I853a76d9Mathias Agopian2013-02-151-28/+37
|\ \ | |/ | | | | | | | | * commit 'ceec31b7dab6a23e443d5dcbcfac4a23b720cfde': Refactoring: Rename SurfaceTextureClient to Surface clean-up following Surface split
| * Refactoring: Rename SurfaceTextureClient to SurfaceMathias Agopian2013-02-151-14/+23
| | | | | | | | Change-Id: I5a218ca11abeeec05e3a4c3cfc581bcc788814ea
| * clean-up following Surface splitMathias Agopian2013-02-151-14/+14
| | | | | | | | Change-Id: I853a76d92d957ee38a36fcdd280d6407ec316987
* | Final merge fixKristian Monsen2013-02-141-3/+0
| | | | | | | | | | | | | | | | Fixing a crash on reboot. After this it builds and cts tests passes as before. I don't have a device locally so can't see if it actually works. Change-Id: I56cd09d5f83f8096ba0fe8aa8e93ca4286f42e3a