History log of /frameworks/base/libs/hwui/hwui/Bitmap.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4277d8f3e6d967e9fdca181d7bbc9516f9a1fe0e 23-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix recent apps in system UI for Skia pipeline" into oc-dev
f5f27cd828084456bbc01520b44688df2b49b4b2 22-May-2017 Stan Iliev <stani@google.com> Fix recent apps in system UI for Skia pipeline

Enable HW Bitmaps for Skia pipelines by using a readback to
convert GraphicBuffer into a raster SkImage. Both BitmapShader
and drawing HW bitmaps into a canvas are supported.

Test: recent apps work, no memory leaks, CTS graphics and
UiRendering tests passed, HWUI unit test passed
bug: 38136140
Change-Id: I23fed5febad3b1009e0417fb7e21a347a8d11b0d
Merged-In: I23fed5febad3b1009e0417fb7e21a347a8d11b0d
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
9a814875c4e3a98fea99dae623f22268a9afa38a 23-May-2017 John Reck <jreck@google.com> Improve time to texture destruction

Eliminate textureCache.mGarbage which is only cleared
in a trimMemory. Instead when we hit ~Bitmap post a
message to RenderThread to release the texture immediately

Bug: 38258699
Test: manual
Change-Id: I962ba275e89afb628ba02f74769287edbab9fed4
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
576b6a8a7994f649c0dbacfc34611d1580e16bd6 17-May-2017 John Reck <jreck@google.com> Revert "Fix recent apps in system UI for Skia pipeline"

This reverts commit 625dd56a45bfe95c5f1baa1891529503ff3374a9.

Reason for revert: Caused a memory leak, b/38330767
Bug: 38136140
Bug: 38330767
Test: manual, verified memory isn't leaking doing the steps in b/38330767

Change-Id: I998bea04788d58ba6bad71c1691d5a3b33190c1b
Merged-In: I98b2dfd750be57a15785808e2d5723616e2ce20a
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
625dd56a45bfe95c5f1baa1891529503ff3374a9 06-May-2017 Stan Iliev <stani@google.com> Fix recent apps in system UI for Skia pipeline

Enable HW Bitmaps for Skia pipeline just enough to make
recent apps list working by adding support for BitmapShader.
Drawing HW bitmaps in a canvas is also supported.

Test: recent apps work, HWUI unit tests pass, CTS tests pass.
bug: 38136140
Change-Id: Ibd06c859c86dc213310d5ce5272497e1882d0cc6
Merged-In: Ibd06c859c86dc213310d5ce5272497e1882d0cc6
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
9fd259c9b0878ba52fec86173d76976e70977fcd 04-May-2017 sergeyv <sergeyv@google.com> Add StrictMode.noteSlowCall to calls that result in hw bitmap readback

bug:37748500
Test: BitmapTest:*inStrictMode
Change-Id: Ifea1c6f0c50ba2f409c96b7ccf7eb31c89ef81c8
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
8242656f495847c50c9ceaea92839dce78218a75 05-Apr-2017 Romain Guy <romainguy@google.com> Color management, the missing pieces

Implement missing color management pieces for bitmaps:

- Bitmap.createBitmap(Bitmap src, ...) now creates a bitmap
in the same color space as the source bitmap
- Bitmap.createScaledBitmap() now creates a bitmap in the
same color space as the source bitmap
- Bitmap.createBitmap(..., ColorSpace colorSpace) to create
bitmaps in a specific color space
- Fix copy from A8 to F16
- Copying bitmaps in F16 or with a color space does not work,
it's currently a limitation in Skia

Bug: 36905374
Test: BitmapColorSpaceTest
Change-Id: I0092fe4432511db50daa3a9393389a9db05e0c2a
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
7c98f5da3d95ef383de04fb5e941adec4fe1a4cf 06-Apr-2017 Romain Guy <romainguy@google.com> Fix HardwareBitmapTests.testBitmapConfigFromRGB565

Bug: 37077304
Test: HardwareBitmapTests.testBitmapConfigFromRGB565
Change-Id: I987eeab243f93f9ee8fe8d1b6a12ddbd23225651
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
caaaa66e57293e4a6f312649bf472eab84d5c7fe 27-Mar-2017 Romain Guy <romainguy@google.com> Convert bitmaps to sRGB/scRGB when they have a color profile

This change also fixes an issue with RGBA16F bitmaps when modulated
with a color (for instance by setting an alpha on the Paint object).

The color space conversion is currently done entirely in the shader,
by doing these operations in order:

1. Sample the texture
2. Un-premultiply alpha
3. Apply the EOTF
4. Multiply by the 3x3 color space matrix
5. Apply the OETF
6. Premultiply alpha

Optimizations:
- Steps 2 & 6 are skipped for opaque (common) bitmaps
- Step 3 is skipped when the color space's EOTF is close
to sRGB (Display P3 for instance). Instead, we use
a hardware sRGB fetch (when the GPU supports it)
- When step 3 is necessary, we use one of four standard
EOTF implementations, to save cycles when possible:
+ Linear (doesn't do anything)
+ Full parametric (ICC parametric curve type 4 as defined
in ICC.1:2004-10, section 10.15)
+ Limited parametric (ICC parametric curve type 3)
+ Gamma (ICC parametric curve type 0)

Color space conversion could be done using texture samplers
instead, for instance 3D LUTs, with or without transfer
functions baked in, or 1D LUTs for transfer functions. This
would result in dependent texture fetches which may or may
not be an advantage over an ALU based implementation. The
current solution favor the use of ALUs to save precious
bandwidth.

Test: CtsUiRenderingTests, CtsGraphicsTests
Bug: 32984164
Change-Id: I10bc3db515e13973b45220f129c66b23f0f7f8fe
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
2bd7d98fe844ebd6632a55eee9abf6d18651caf5 28-Feb-2017 Mathias Agopian <mathias@google.com> fallout from getting rid of IGraphicBufferAlloc

Test: compiled & run
Bug: cleanup
Change-Id: I1590105d3abef985c2ae7c1a03cdf5fd2ec4bef9
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
efb4b06493fe7b1604c762a448b13c7af2845a8d 27-Feb-2017 Romain Guy <romainguy@google.com> Add ColorSpace information on Bitmap

This is the first step toward interpreting color spaces at render time.

Bug: 32984164
Test: BitmapColorSpaceTest in CtsGraphicsTestCases

Change-Id: I0164a18f1ed74a745874fe5229168042afe27a04
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
89ddb1f1644e0b47de060d2c9aaf6d5387c38f2f 10-Feb-2017 Matt Sarett <msarett@google.com> Update framework to use new SkColorSpace API

Test: This compiles with SK_USE_LEGACY_NAMED_COLOR_SPACE
turned off.

Change-Id: Ie573f59e0aa475bab06b38589db3c6158ad82c5a
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
9f4a82f5692831ad80f515fa831fddfdfe50b7b0 02-Feb-2017 sergeyv <sergeyv@google.com> Hardware bitmaps: Destroy texture ID generated for the copy

Test: manual
bug:34807359
Change-Id: Idb1ef2a2efcb3cf7fb96e2a1f0554a06e7cd0fc2
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
6f773a0d8717162f81ff21d943baaa539a2d6c7e 29-Sep-2016 Mark Salyzyn <salyzyn@google.com> Replace cutils/log.h and android/log.h with log/log.h

Test: compile
Bug: 34250038
Change-Id: I42185a879beaa9bb244f53a968800392b854ac45
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
8b6fe1d8948bbd6479387ab1015a306022b55db4 19-Dec-2016 Sergei Vasilinetc <sergeyv@google.com> Merge "Support Bitmap.copy for hardware bitmaps"
05126d151eb3caa85bd3a039cffb6e37940c3fa4 16-Dec-2016 sergeyv <sergeyv@google.com> Support Bitmap.copy for hardware bitmaps

Test: android.uirendering.cts.testclasses.HardwareBitmapTests#testBitmapConfig*
bug:30999911
Change-Id: I2e80dff914bfa0666290701072ac93d30d218e8d
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
9505a6552764461c22ce48f1ac13d025d23e1579 14-Dec-2016 Romain Guy <romainguy@google.com> Add new RGBA_F16 bitmap config

This configuration uses 64 bits per pixel. Heach component is stored as a
half precision float value (16 bits). Half floats can be decoded/encoded
using android.util.Half.

RGBA_F16 bitmaps are used to decode wide-gamut images stored in 16 bit
formats (PNG 16 bit for instance). aapt is currently not aware of PNG
16 bits so such files must be placed in raw/ resource directories.

This first pass provides only partial drawing support with hardware
acceleration. RGBA_F16 bitmaps are stored in linear space and need
to be encoded to gamma space with the appropriate OETF to be rendered
properly on Android's current surfaces. They are however suitable for
linear blending. Full rendering support will be provided in a future
CL (BitmapShaders might be a bit tricky to handle properly during
shader generation).

Bug: 32984164
Test: bit CtsGraphicsTestCases:android.graphics.cts.BitmapRGBAF16Test

Change-Id: I328e6b567441a1b9d152a3e7be944a2cf63193bd
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
91d6354cde90b6625d4af6a5d909d886bf602a49 15-Dec-2016 sergeyv <sergeyv@google.com> HWUI: fix support RGB_565 for hardware bitmaps

Test: hwuimacro hwBitmap565
bug:30999911
Change-Id: Ie4128aba95a92041b7388c46d0b2109feaae302a
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
cd55852fcd840f7f4c4d7a0a7253a2995c77afa2 17-Nov-2016 Greg Daniel <egdaniel@google.com> Make buffer age work in Vulkan

Test: manual testing in skiavk mode

Change-Id: I5b9d8af7d9cecf2f022ef104ec33a5b7477e9e0c
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
9a029876422926e313f646f44ab3592cfd4f9933 29-Nov-2016 sergeyv <sergeyv@google.com> Add createHardwareBitmap on GraphicBuffer for SysUI

Test: none
bug:30999911
Change-Id: Ic396e25d9e587665e634c3192e14ef4bc3dc78f7
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
59eecb526adc5bd7041e7b6147bfcc40dd2c200e 18-Nov-2016 sergeyv <sergeyv@google.com> Support readback from hardware bitmaps

Test: hwuimacro readbackFromHBitmap --onscreen.
bug:30999911
Change-Id: I369c069c40cb0f9adae5a94501815f29c2d7df0f
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
554ffeb8b7c836da43a637c59eedfc617895b19d 16-Nov-2016 sergeyv <sergeyv@google.com> Support hardware bitmaps in bitmap shaders

Test: hwuimacro bitmapShaderEglImage --onscreen.
bug:30999911
Change-Id: I9d16a1c217a4474841794cf27ce49e3f7823678e
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
850054cb46b25e20c1ae0b409734c0fa5c634b18 26-Oct-2016 Craig Donner <cdonner@google.com> Use layered version of graphic buffer allocation calls.

Allocators now require a layer count, but in these cases we can
assume that a single layer is sufficient, since that's what they
effectively do now.

Bug: 31686534
Test: manual
Change-Id: I30e498f8cb3e27c497f7bab9fbf2e7b4dad842d5
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
1106b82ea13be80d59eee728a6cf8d4bfa4e3119 03-Nov-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Reference ctable when adopting pointer in Bitmap"
003f14256271a6955baacba93e54f09d366f1c3b 03-Nov-2016 sergeyv <sergeyv@google.com> Reference ctable when adopting pointer in Bitmap

Change-Id: I56aea10928f0ec73756ed055488a3e3516a9096e
Test: manual.
bug:32621254, 32561595
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
ab12c1fe73734a18ac19a06b97f276528f6d027a 03-Nov-2016 Mike Reed <reed@google.com> update callers to newer Skia APIs

Test: refactoring CL. Existing unit tests still pass.

Change-Id: I47e73e00f14f78dd9d4c48a142ac9853e7e4cad7
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
694d499662838123f474f41b31dea84ec5d563f0 27-Oct-2016 sergeyv <sergeyv@google.com> Routine to upload hardware bitmaps

Change-Id: Id8283a0975325e6830d55fd1e33c5f292a1e9be0
Test: refactoring cl.
bug:30999911
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
ec4a4b13eae2241d1613890c1c1c096bed891845 21-Oct-2016 sergeyv <sergeyv@google.com> Use Bitmap in DisplayList & RecordedOps instead of SkBitmap
Test: refactoring cl.
bug:32216791

Change-Id: I1d8a9a6e772e2176b6c2409409a910478b45f8db
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
fc9999505a36c66892d7ccce85187936105f4f36 17-Oct-2016 sergeyv <sergeyv@google.com> Pass Bitmap instead of SkBitmap for bitmap rect operation
Test: refactoring cl.
bug:32216791

Change-Id: I66d19194c57b3aa2c400aa87acffc774a533776a
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
aed7f58fb05a25ce2112829e77c0eb5dd268e8a7 15-Oct-2016 sergeyv <sergeyv@google.com> Pass Bitmap instead of SkBitmap in canvas.drawBitmap(Bitmap, float,float,Paint)
Test: refactoring cl.
bug:32216791

Change-Id: If9f9fbc19e683b14cce6c3c268258bd832d495d2
/frameworks/base/libs/hwui/hwui/Bitmap.cpp
c1c54062f8cc9d47bdea820ae5ab6aef260b4488 20-Oct-2016 sergeyv <sergeyv@google.com> Rename hwui/PixelRef to hwui/Bitmap
Test: refactoring cl.
bug:32216791

Change-Id: I26de43f71027bccb43a5011f84080ab4631b2883
/frameworks/base/libs/hwui/hwui/Bitmap.cpp