Age | Commit message (Collapse) | Author |
|
* Apply the gainmap in reverse when using an HDR base image
* Support alternative primaries
* Nudge the guards that optimize away applying the gainmap shader
Bug: 349357636
Flag: com.android.graphics.hwui.flags.iso_gainmap_apis
Test: GainmapTests
Change-Id: I230a765feddb306330e643e6ead8e62719f49ee5
|
|
Fixes: 367272642
Test: none
Flag: EXEMPT bugfix
Change-Id: I6831512e799df9025a91d768094a1862802803e4
|
|
Bug: 297336724
Bug: 364533012
Flag: EXEMPT removing com.android.text.flags.fix_double_underline
Test: N/A
Change-Id: I794d7f7061e7f11be495a3b26ba98a8fc69c5820
|
|
Prior to this change, the render thread would only receive a non-owning
pointer or reference to a Mesh. Also because the Mesh itself was passed
by pointer, the refcount in its uniform sk_sp<SkData> would not be
incremented until an SkMesh was updated on the render thread, causing
uniform setting calls on the UI thread to impact prior draw calls with
the same mesh. The dirty flag used for the uniforms was also signaling a
reupload of vertex and index data to the GPU.
This fix adds a MeshBufferData class to handle keeping Skia buffers
up-to-date, and a Mesh::Snapshot class that carries shared ownership of
all pieces needed to construct an SkMesh. The snapshot is stored on the
render thread by value and increments the refcount of the uniform
sk_sp<SkData>.
Because the current Android Mesh API does not support partial buffer
updates, there is no need for a dirty flag, as comparing the
DirectContextID and checking if the buffers have been created is
sufficient. Creating an SkMesh is performed lazily inside the SkMesh
getter of the snapshot.
BUG: 328507000
Test: atest CtsUiRenderingTestCases:MeshTest
Change-Id: Iabe83dca462d4526c118047621b131009032d35b
|
|
Test: atest CtsUiRenderingTestCases:android.uirendering.cts.testclasses.ShaderClippingTests
Bug: 280116960
Change-Id: Ic78c4b2ca01e6af9e5af757aa64e15e248cadcf8
|
|
Test: atest CtsUiRenderingTestCases:android.uirendering.cts.testclasses.CanvasTests#testDrawWithConcatenatedMatrix44 && atest CtsGraphicsTestCases:android.graphics.cts.Matrix44Test
Bug: 280116960
Change-Id: Ifd336585f578592985d45bbe6ad0728fbcdafa4b
|
|
Skip using the gainmap shader when drawing to a bitmap
with a known SDR colorspace as it'll be a no-op in
rendering results since W=1.0, but it'll be very expensive
in runtime due to CPU evaluation of the SKSL shader.
Before:
createScaledBitmapWithGainmap_median (ns): 179,455,037
After:
createScaledBitmapWithGainmap_median (ns): 15,643,742
Bug: 311085927
Test: benchmark in CL
Change-Id: I3f2506a2bd86bbe29c6e0837d31e4a231a7c182a
|
|
Bug: 297336724
Test: atest hwui_unit_tests (with flag on/off)
Change-Id: I48018abd68c767c9c7ad08722a8974efc1bfe67c
|
|
Bug: 270744068
Test: GainmapTests in uirendering
Change-Id: I57e55b1a27d49c19d232ad9c4418d715eca57f7c
|
|
Refactored Mesh API to defer creation of
SkMesh instances until a GrDirectContext
can be obtained on the RenderThread.
This creates an SkMesh during the prepare
tree step when the UI thread is blocked
to ensure no concurrency issues.
Bug: b/265044322
Test: atest CtsUiRenderingTestCases:MeshTest
Change-Id: Ica8c364b99952e0ee71f7b95b312cf29c51ebc2a
|
|
LottieDrawable""
|
|
This reverts commit 2e58b5c4b9f7d96ce84ccc0dabe2fcd3667052fe.
Reason for revert: prep for mainline
Bug: 257304231
Change-Id: I51515a6eed577ad098020588f12cafc8fff0541e
|
|
Bug: skbug.com/13983
Change-Id: I094a0ae69653d428f2c47d1fdbb2cd32def9a347
|
|
|
|
SkDeque is private to Skia and the std library one should be
sufficient.
This change was started by kjlubick@ and continued by nscobie@.
Test: existing presubmits (functionality unchanged)
Change-Id: I60751aa77337c1601428d00d3ba4bc4b8ccb67a9
|
|
This is an initial push that only supports basic playback
Test: frameworks/base/tests/VectorDrawableTest and run LottieDrawable activity
Change-Id: Ic34366b0cd0984a512d8684d476227830903f778
Bug: 257304231
|
|
Added drawMesh method to the Canvas API, utilizing SkCanvas::drawMesh.
Bug: b/253321460
Test: HwAccelerationTest MeshActivity
Change-Id: I43802af61bbd6f76444b4e4b7cec2b95bae34f66
|
|
|
|
3fde6cee3c54269ea40158a3057fd61daa82dac7
This is the same CL as the original CL, with the exception that SurfaceView#isZOrderedOnTop checks mRequestedSubLayer, rather than mSubLayer.
This is to fix a CTS failure with InlineContentViewTest#testSetZOrderedOnTop, which set the Z order of an offscreen SurfaceView without binding it to a layout.
Change-Id: Ifdfa710d87f7ea4c333505ffdcc7fbff06245fba
|
|
|
|
Revert submission 19562144-surfaceview-alpha
Reason for revert: Presubmit breakage b/245651921
Reverted Changes:
I7510a3a6c:Add CTS for applying alpha for SurfaceView
Ibc14b18f1:Support alpha for SurfaceView
Change-Id: I498c98951a53e6bb1c1251dceb9d150311b07cc8
|
|
|
|
Basically, this removes an excuse for apps to use TextureView for video
playback or one-off HDR images prior to HDR UI being ready everywhere.
The idea is that for Z-above, applying alpha is easy, because the
surface just needs to be have alpha modulated. Z-below is a little bit
more creative - the alpha is applied to the hole punch and drawn using
DST_OUT blending semantics. This allows for views underneath the
SurfaceView to blend with surface, while being occluded by views on top
of the SurfaceView.
There may need to be some complex view hierarchies that would be useful
to test, but simple view layouts seem to work.
Note that this is guarded with a target SDK check, to defend against
applications that are propagated alpha to child views while expecting
opaque SurfaceViews.
Bug: 241474646
Test: HWAccelerationTest doesn't look broken
Change-Id: Ibc14b18f1ce6f25250318db50275c6b8c972bade
|
|
am: d80d36a428 am: eda3dacc31 am: 86a8d4f4d4 am: e406bb523a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2200075
Change-Id: Iab55e8449d54380693cfe2cc78ea02eae2a0e611
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
After upgrading libc++, there are errors complaining about the the
incomplete Clip type in the "std::vector<Clip> mClipStack" member of
SkiaCanvas. The "SkiaCanvas::SkiaCanvas() {}" ctor can call ~vector
(maybe when an exception is thrown), and ~vector needs to know the size
of Clip.
(I'm not sure why this wasn't a problem before, but this seems to fix
the problem.)
Bug: http://b/175635923
Test: treehugger
Change-Id: I1d689c91be3b0530272836eeb727709ff1084545
|
|
I would like to (re-)land https://skia-review.googlesource.com/c/skia/+/512158
which tidies up includes around SkRRect. I searched for all
places in libs/hwui that used SkRRect and made sure they either
forward declared it or included it, as appropriate.
While going through these files, I fixed a few other includes that
stood out to me, e.g. SkPaint, SkCanvas, etc to make sure the files
that use the symbols are the ones including them (and lessening
transitive dependencies).
Change-Id: I44792a6b9f06a54d052cefa4cbc9342f46ab2a4f
|
|
At the JNI bridge, Region::Op::kReplace_Op is detected and sent
to new functions on Canvas.h -> emulateReplaceClip[Rect|Path].
The SkiaCanvas implementation calls
SkAndroidFrameworkUtils::ResetClip to turn the SkCanvas' clip
wide open (modulo the device clip restriction), followed by
an intersect op with the actual clip geometry.
SkiaCanvas is also updated to record the replace ops in its
Clip struct for partial saves.
This should result in no visible behavioral change at the Java
Canvas level, but allows the removal of the
SK_SUPPORT_DEPRECATED_CLIPOPS flag.
Test: Updated SkiaPipeline.clip_replace unit test to use the new
emulateReplaceClipRect function instead of SkClipOp::kReplace.
Builds and recently added CTS tests for clip ops pass.
Bug: b/151725198
Bug: b/143352151
Change-Id: I8fb8765b4ead92bbe8eceadb52710a5673b6cf6b
|
|
Update Paint and SkiaCanvas now that SkFilterQuality is no longer
part of Skia's API.
1. Store mFilterBitmap:bool directly in Paint (matching java side)
2. Change Looper construct to operate on Paint rather than SkPaint
... so it can access mFilterBitmap.
3. Update PaintFilter to take Paint instead of SkPaint
As before, when we do have to call SkCanvas, we convert Paint's
mFilterBitmap into SkSamplingOptions as needed.
Test: make
Bug: 178700363
Change-Id: I7fccf17657d4e255f2453b4bfc513215503597b2
|
|
Add force-dark support to RippleDrawable by modifying the ink color.
Test: manual
Test: atest CanvasOp
Fixes: 186130682
Change-Id: I89eaaf3afa5ec53a74d2d08de8cff6484e55a912
|
|
The sparkle loop animation was happening on the UI thread and is poses
some interesting challengers:
- Animations freezes when UI thread is busy, for example when
startActivity is called.
- onDraw calls add unnecessary work to the UI thread, leading to jank
in some cases, like PIP
Test: manual
Fixes: 184760248
Change-Id: Ie2840c767da61476678839eaac215dc3aff95b5c
|
|
Update RenderNodeDrawable to hole punch areas into
layers created for SurfaceView
Bug: 184297961
Test: Added CTS test to SurfaceViewTests
Change-Id: I1f03a4fe34c5a8b7411ebe728ea3d4195fcd1fac
|
|
Removes complication of copy-on-write intermediate class, and
allows for shaing a single applyLooper() function.
Test: make
Bug: 178700363
Change-Id: Ia74cb8e7c650e469b8429de1d7cf9204821d8f11
|
|
Test: make
Bug: 178700363
Change-Id: I1d328275ab5e0c9b6b9171ef075f71274e50a3f5
|
|
1. drawBitmap --> drawImage
2. drawImage now always requires sampling parameter
Bug:178700363
Test: make
Change-Id: I96f610a180b3774ba955cc334949fd62b1cf4d69
|
|
Test: make
Bug:178700363
Merged-In: I14541a21abb885c5291ca839d72ed6434c9accd1
Change-Id: I14541a21abb885c5291ca839d72ed6434c9accd1
|
|
uniforms are no longer set as single block of bytes where the caller
has to know the offset, but instead by the string identfier in the
shader. This CL only supports floats, but future expansions of this
will provide helpers for ints, colors, and byte[].
Also by storing the shaders and uniforms in the RuntimeShaderBuilder
we can more easily copy them. This enables Canvas.drawRipple to not
just copy the compiled SkSL effect, but also all the uniforms and
other input shaders set on the RuntimeShader.
Bug: 177051137
Test: HwAccelerationTest
Change-Id: I4733f42ba662546be6bebc37f0b89832778e66ce
|
|
This also adds the ability for RenderThread to animate a few
predefined shader uniforms.
Bug: 177051137
Test: demo in ag/13296877
Change-Id: I6e58e671ad1242a07ecb1cf4cdb48031f85c2088
|
|
Test: make
Change-Id: Ie979cdb10263a08ea3d8c817234b94c9b61abb76
|
|
This has been hardcoded as ALL_SAVE_FLAGS for a couple releases now.
Since it's now permanent behavior, remove the last bit of plumbing
for SaveFlags on saveLayer
Test: builds & boots
Change-Id: Iec92f27199d0b4781c2293dcdcfd45a1562a1b4e
|
|
This reverts commit fc42a99ea5712883c9872d34a523d972c26c9d6f.
Because we are moving away from a wrapper class to delegate
between SkImageFilter and SkShader and instead adding
RenderEffect on RenderNode, this wrapper implementation
is no longer necessary. There are some behavioral
differences between SkShader and SkImageFilter that
would lead to additional complexity in conversions
between these objects and potential bugs.
To simplify this, RenderEffect will be added
directly to RenderNode to support better
caching of rasterization layers that is necessary
for various visual effects like blur.
Test: N/A
Change-Id: I65dc9f8bd26aed8761af13491ae3f6d583208377
|
|
The bounding box information is not used for drawing glyphs, so
removing them from Canvas.
Bug: 169114687
Test: hwui_unit_tests
Change-Id: I512717cd00fe56e5b74fcc32fbdf2319e273074e
|
|
Created Shader classes to wrap existing shader classes
in the framework in order to handle creation of either an
SkShader or SkImageFilter.
Updated native Paint implementation to optionally configure
the currently configured SkShader or SkImageFilter
Bug: 143468037
Test: re-ran CtsGraphicsTestCases and CtsUiRenderingTestCases
Change-Id: I7663b92766c912ab3866cf4e39b268f6dcf5d8e2
|
|
Bug: 151439970
Test: CtsUiRenderingTestCases passes
Change-Id: I1c29df17bb6e8b078467edf73cb3547db6948cdd
|
|
e21afec2c5 am: 697eda359d am: 847725f66e
Change-Id: I06729007ece72910f2b3f6d5af3f027489547315
|
|
Bug: 140255441
Test: I49c468b0f4cc142e5d6b03f0aee917b3d85153f3
Fix two issues that prevented this combination from working:
- make() the SkTextBlob once and reuse it for each iteration of the
loop. This is necessary because make() resets the SkTextBlobBuilder,
so a second call does nothing.
- use the altered SkPaint, passed as a parameter to the lambda, rather
than the Paint passed to apply_looper.
Incidentally, reference mCanvas directly like the other methods, rather
than calling asSkCanvas(), which returns mCanvas.
Change-Id: I48ea1232b12df4f5f8afffc20c7dc8e5dc2bb511
|
|
Test: Adding IWYU header. It still builds.
Change-Id: I40df22a18fef960259b144d491f0c2f794d159b6
|
|
|
|
Updated native hwui implementation to pass in
optional anti-alias flag to canvas clipping operations.
Made the default behavior to enable canvas clipping
Bug: 69115461
Test: Added test to CtsUiRenderingTestCases
Change-Id: I996f4b56e161cdc9f1ec5eba9c30f94474520af5
|
|
Test: built for pixel3, confirm shadows on text of launcher icons visible on a background image that shows it well.
Bug:144199311
Change-Id: Ia2e71a1f0982ef94a9b0c0573bf76ead0c0b9b81
|
|
This allows us to remove the legacy enum from SkCanvas.h
Test: make
Change-Id: I892f18169d9eaeead8332a63d1cebf28bba4159c
|