Document the 3 variants of SkDrawable object lifetime in
SkiaRecordingCanvas:
- The only drawable that is using ref couting to delete itself is
"LayerDrawable"
- 2 other drawables (RenderNodeDrawable and GLFunctorDrawable) are
deleted by std::deque
- the rest are deleted by ~LinearAllocator
bug: 36717955
Test: built and ran on device
Change-Id: I16f7f6573f6e4dc8d665f58d051255d40b1b690d
ID types should not be encoded as a map. AAPT and AAPT2 emit
IDs as boolean types.
Some apps exist that for some reason have their ID types encoded
as empty maps. This is the case only for the auto generated IDs
from enum values in <attr> tags.
Allow IDs as maps and ignore their content when processing an APK
for optimizing.
Also fixes an issue with expected size of the ResTable_package struct.
Bug: 35861796
Test: tested against the APK in b/35861796
Change-Id: I29a19cd9777bb10bed6766cd42e35e50e098797b
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
Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#
The 3 tests are in the same folder, have to be built together then run.
Bug: 35882476
Test: local test
make -j32 hwui_unit_tests
make -j32 hwuimicro
make -j32 hwuimacro
tradefed.sh run template/local --template:map test=hwuimacro
Change-Id: I13f785d8e3215c61776a1beecaa121c7dc30bfec
Draw VectorDrawables in GPU backed surface. Render VD cache
at the beginning of the frame to avoid context switching.
Test: CTS graphics tests pass.
Change-Id: Ia14e0ec4049c3fa87f03547fbda44043bf8dd793
Probably won't fix anything but this assert is in queue()
but not queueAtFront() and inserting a task twice is Really Bad.
Bug: 36139852
Test: ¯\_(ツ)_/¯
Change-Id: Ida0f829eecfdd46c17c36b816528c49d12b7cf29
This reverts commit 2dc804be11444565e3d1d151c2a693db3ade94c0.
It also removes the related calls from UiModeManager.
Fixes: 32721178
Test: make & flash
Change-Id: Id371bccec611155cc6910e46b3277c3d27fc1c79
Test: code compiles & test continues to succeed
https://skia-review.googlesource.com/c/9882/ (Remove budgeted parameter
from SkSurface::makeImageSnapshot (take 2)) seems to have stuck so this
should be safe to land.
Change-Id: I9e6fdcc8debe7964e9522f7acd8829b54bc90986
An overlay was incorrectly leaking its own resources into the
framework resource package, which caused warnings for every app
that tried to access framework resources (all of them).
This change skips including any resources that are not overlaying
anything (not present in IDMAP).
Bug: 36256974
Test: make libandroidfw_tests
Change-Id: I8c710af6849bb848938825aacca02799ee96c003
Apply the path matrix to the canvas instead of creating a new path.
Delete logic that scales the stroke, because this is done through
the matrix as well. Merge/delete some functions.
Bug: 36392701
Test: CTS graphics tests pass with minor changes in 6 golden images.
Quick settings and settings app drawables are OK. Vector icon app
draws identical paths.
Change-Id: If623bc0a535fad95a2839f79bd997c016bcd9d4d
Skia would like to move SkOSFile and make it private spi. This appears
to be the only place SkOSFile is used outside Skia, and using access
here directly is more apropriate.
Test: Simple inline refactor, built and ran. Changes test code only.
Change-Id: Ib76c180bb3bccc54c20dcadc842837e3e8270929
In order to allow multiple packages with the same package name, but
different package ID, we need to keep searching packages until the
resource is found.
Bug: 30999713
Test: make libandroidfw_tests
Change-Id: If4540e12731ca18a18e9e550a9bf248606a586c5
Frankengradients (linearly interpolated RGB, gamma interpolated alpha) look
fantastic but unfortunately create sligh compatibility issues. For instance,
a gradient from 0xffea1030 to 0x00ea1030 (opaque to alpha, with a single
color) blended on top of 0xff101010 would not look the same as a single
opaque gradient from 0xffea1030 to 0xff101010. The difference is hardly
noticeable on simple gradients but it could cause confusion amongst app
developers. Their life is hard enough as it is, let's be good to them.
My crusade against the gamma world is not over and one day I shall
be the victor. I am patience.
Bug: 35485208
Test: UiRendering.ShaderTests, UiRendering.GradientTests, manual testing
Change-Id: I8204e60cdf0a6b12dfe22638d30ca9622687000e
A copy of LinearTransform is moved here.
This reverts commit b80f086f69a4bc2e51d1f94ae58d7ba6b20514c4.
Test: compile/run
Bug: treble cleanup
Change-Id: I435cac1f57ded10d434e4354985ad1a1bd3841f3
This reverts commit d4d6167f614a9001d9827a8634a26b5e9445a22c.
Bug: 36206160
Test: Fugu compiles, didn't before the revert
Change-Id: I2b0d3a05546ee2605555a9aa7ae028f2baeaf439