Properties::isDrawingEnabled can unexpectedly return true
even if the system property debug.hwui.drawing_enabled is false,
if its called before RenderThread is created.
This commit changes the underlying logic to lazy load the
debug.hwui.drawing_enabled prop value.
Bug: 201691826
Test: m
Change-Id: I599426c8734d418f073fd0456c2b1149fb69d80c
This feature is intended for use in headless test environments,
where disabling drawing has minimal compatibility impact and can
save significant resource usage when running UI tests.
This feature is controlled via a new system property
'debug.hwui.drawing_enabled', and a HardwareRenderer API that can
override the property value on a per-process basis.
Bug: 201691826
Test: boot emulator
Merged-In: I93c21e680382e03342f235dbf58bd7a5c8a6f767
Change-Id: I391c841e3a0cdcfcc6c7910a316a4dd5e970547d
When we use GPU to copy the data, rendering would choose filter. But we need add shrink in border to ensure the sampler not reach border like what GUI does.
Change-Id: I2c59956f3d7a7052d8e4bee587360f252a6c5549
Signed-off-by: Chun Jiang <chun.jiang@mediatek.com>
Bug: 197180327
Test: CTS PixelCopyTests & DecodeAccuracyTest
Fix issue where the initial snapshot used to create a
resultant SkImage instance with an SkImageFilter applied
was not initialized.
Fixes: 201312688
Test: Re-ran CTS tests
Change-Id: I2440a161c70076850479c562c7c9e6dc8d756236
Added property to conditionally cache SkImage instances
with SkImageFilters applied. Some GL vendor implementations
invoke Fence::waitForver without signalling, leading
to ANRs throughout the system.
Bug: 193145089
Test: manual
Change-Id: I3e478b11b66205d96e9499a362f7412a1d6e952d
Updated ImageFilter caching logic to update the snapshot
whenever the surface generation ID has changed.
Fixes: 199242895
Test: Added test to RenderNodeTests
Change-Id: I803dce35ba15a098f14dc02a479abf8b2fbae51f
Change the default value of the sysprop to be true.
Bug: 173671170
Test: install webview apks from Vasiliy, make sure surface control is
used.
Change-Id: Idf495a2be3b2bdba4fdaa380a5dbe9fd96158a97
When WebViewFunctor is destroyed, overlays needs to be removed.
Bug: 194393522
Test: toggle fullscreen during video playing, and run "adb shell dumpsys
SurfaceFlinger | grep Webview", it should only show onlyi one surface
control
Change-Id: I40d0e503c4f5b25c59886820485e7734716ac859
(cherry picked from commit 9c5158f7a2f3bff0ccfc8e071143aac7b5c95049)
Bug: 195081399
Test: manual + dumpsys gfxinfo
CanvasContext::draw has some conditions under which it will not draw. We
still need to flushAndSubmit to free scratch memory if there were
texture uploads this frame.
Change-Id: I60d230cd36bed310a3155e4f1ca647c99c13c4cd
The region outside of the BQ crop rect is potentially
garbage. Avoid sampling from it.
Fixes: 189656466
Bug: 193378020
Test: CTS PixelCopyTests & DecodeAccuracyTest
Change-Id: I2910d93471f08aaf807ac9f87fdf84cf29cf4143
Merged-In: I2910d93471f08aaf807ac9f87fdf84cf29cf4143
If errors occured during finishFrame that caused us to not have a
semaphore or possibly destroy the semaphore early we will end up
with a null mDestroySemaphoreContext in swapBuffers which we tried
to destroy unconditionally.
I haven't repro'd the connected bug, but based on the crash stack
this seems like the likely cause.
Test: manual code inspection and build.
Bug: 191950033
Change-Id: I0fbd33edff3552b91b980da9e3b2c45bc52a2dd0
Ensure GrContext::submit() is always called after either
Bitmap#prepareToDraw() or if DrawFrameTask skipped drawing.
In either case texture uploads & deletions will be scheduled,
but without the submit they won't actually be performed. This
can end up running out of RAM.
Bug: 189393671
Test: manual test app
Change-Id: I57477c64457558487e9e5ec0a979ad9099a8cb2c
The region outside of the BQ crop rect is potentially
garbage. Avoid sampling from it.
Fixes: 189656466
Test: CTS PixelCopyTests & DecodeAccuracyTest
Change-Id: I2910d93471f08aaf807ac9f87fdf84cf29cf4143
This field actually requires a special lock, mFrameMetricsReporterMutex.
But there isn't a GUARDED_BY annotation for it. And even if there was,
the compiler feature of -Wthread-safety was not active in this code, so
this error would not have been caught.
To fix this, enable the compiler annotation and add GUARDED_BY
annotation to mFrameMetricsReporter.
And finally, use this lock to properly protect this field.
Bug: 192330836
Test: atest hwui_unit_tests
Change-Id: I76950bfa01bbd7ccdc54c4e8c114430b5aeddf1a
Disable end-to-end input latency metric to reduce the
number of JNI WeakGlobalRef acquires per-frame.
Bug: 189738006
Test: Observe trace section no longer appears in calculator
Change-Id: I062dad8e7cec93cca5599e51d2b0b1a1b6e39a07
Remove Webview overlays when Webview node is set to invisible
Bug: 187292989
Test: play a video in a Webview, toggle visibility for the view, check
existence of a surface control named as "Webview Overlay
SurfaceControl#0"
Change-Id: If47a78a8ae1f7b65b9e7ab983ec72f580d78191a
The boolean system property is named as "debug.hwui.webview_overlays_enabled"
Bug: 192267127
Test: change the property value, check presence of Webview Surface
Control
Change-Id: I01e3e26282a5fa79aa504a6e49c5abe1a1c3ea02
When the root surface control changes, the parent of the Webview surface control must be changed.
Bug: 191900007
Test: switch app, or turn on/off screen
Change-Id: Ib7b34133776fd5944afc638bfee471afe6a17349
This reverts commit da3559683482a61d93b06bed6f46349f6f01dc63.
Bug: b/192050906
If too many RenderProxies are destroyed too quickly, we can end up jamming up the CommonPool preventing RenderThread from making progress if it's waiting on CommonPool tasks.
Change-Id: I8c324bc60891440d9b7be67961f8d5f881dc0f03
Speculation for the cause of an ANR. HardwareRenderer's
cleaner can block on RenderThread, which in turn blocks ART's
cleaner thread. This can potentially cause other blockages, but
it's also poor behavior to have such a long-running Cleaner anyway.
Avoid this by putting cleanup to CommonPool.
Bug: 191514384
Test: make, CtsUiRenderingTestCases still passes
Change-Id: I8190f7862528c3ac39ce636f6fca229322480968
A native transaction passed from webview is sent back to native side, so java side does not manage the life cycle of the transaction.
Bug: 191414767
Test: Play a video, switch to another app, wait for 10 seconds
Change-Id: I013052c202b445438d6cb6497f5f9a2fc22a2b85
In some conditions of scheduling delays, Choreographer may
synthetically advance the indented vsync time. In that case we can't
send a vsync id since there is no one that corresponds to that time.
Test: TBD
Bug: 191840734
Change-Id: I7b2754d5dcb0a3f5fd6cda00a3a2469041116f67
Fixes: 190475978
Damped spring animations asymptotically approach their destinations.
The final pixels can take many frames to complete, but stopping them
means that we get a disruptive jump in those final pixels.
This CL detects when the edge effect animation is close to the finish and
completes the animation with a linear velocity that matches a
common velocity at 8 pixels distant. This means that the animation
terminates quicker so that touch events directed at the contents
after the animation completes (e.g. taps) can interact with the contents
soon.
The CL also adjusts the delta for detecting zero in the stretch
animation as it was jumping by a pixel or more at the end of an otherwise
smooth animation.
Test: manual testing for the visual effect
Change-Id: Ie249b0265c5c5939b597668d5afe4f76d0430821
-Updated StretchEffect to null out the child texture
of the SkRuntimeEffectBuilder after the shader is created
-Release optional mask surface used for
stretching the hole punch
-Release SkRuntimeEffectBuilder instance on RenderNode's
StretchEffect
Fixes: 183592264
Test: manual + re-ran cts tests
Change-Id: I90952666d7489985de9ce798ab792cf3fd7f6087
Set the root surface control transparent, and set the z order of the newly created child surface control to -1.
A new callback is needed to update root surface control in sync from Java side.
Bug: 186750329
Test: use latest APKs from Webview team, play a video, mini toolbar should be visible
Change-Id: I0b37ee8f83fd2b41ff4f2856dbadd31ff6170baf