The line break word style(lw) provides the phrase-based breaking opportunities. When the line break word style is set, it will be brought to ICU for calculation.
Bug: 183780874
Test: atest minikin_tests; atest TextViewTest; atest MeasuredTextTest; atest PrecomputedTextTest
Change-Id: Idd851497e46c1fca87ff590230d93f8bb5c9afae
Add new API to allow applications to specify the line break word style. The line break style is one of the locale extension. When the line break style is set, it will be brought to ICU for calculation.
Bug: 183780874
Test: atest minikin_tests; atest TextViewTest; atest MeasuredTextTest; atest PrecomputedTextTest
Change-Id: Ia9cdb5b83e346f96ae22abbb1bcce05c43207bba
This adds filterMode directly to BitmapShader's public API
which allows users to override the global flag on the paint
or for BitmapShaders used in a RuntimeShader this provides
some explicit control over how the hardware will sample.
Addtionally BitmapShader adds an internal directSampling API
that is exposed only for RuntimeShader via the setInputBuffer
API. Previously, if you want to sample the unaltered contents
of a bitmap you must ensure that the bitmaps contents have the
same format (premul, colorspace, etc) of the destination. This
API enables you to do so without knowledge of the destination
format. This is necessary for use cases where the bitmap content
is data like a normal map or lighting values.
Bug: 189102731
Bug: 201546136
Test: atest CtsGraphicsTestCases:BitmapShaderTest
Test: atest CtsUiRenderingTestCases:RuntimeShaderTests
Change-Id: I8e9eaa8fae1d3ff45ab8c98b3878bb9da24dac47
The fallback line spacing is a feature of extending the line height
when the fallback font has taller glyph. This was implemented to
StaticLayout in Android P but not yet implemented in BoringLayout.
This CL enables this feature to the BoringLayout as well.
Not to break existing apps, change this behavior only if the
targetSdk version is T or later.
This is a 2nd attempt of Ia6d6f9f44e73ddaf5e8fe9a8aead7a53efbddd44
The root cause of SystemUI crash was wrong API usage. (start, end) was
passed instead of (start, count).
Bug: 210923482
Test: atest FallbackLineSpacingTest BoringLayoutFallbackLineSpacingTest
Test: atest CtsGraphicsTestCases
Test: atest CtsTextTestCases
Test: atest SystemUITests
Change-Id: I9137607b0120934f7ad2a12c0f0b8aaa52915831
Throw an illegal argument exception any time a Paint with
a RuntimeShader is attempted to be drawn into a software
canvas. Also mark that a Picture that uses a RuntimeShader is
properly marked as requiring hardware acceleration.
These tests check that the use of RuntimeShaders trigger
Bug: 189102731
Bug: 201546136
Test: atest CtsUiRenderingTestCases:RuntimeShaderTests
Test: atest CtsGraphicsTestCases:RippleDrawableTest
Change-Id: I663e2bc06a3b475f0bb256ce6a9c00c6432ffa42
Remove the deprecated setUniform APIs and replace
with the newly public setFloatUniform APIs
Bug: 189102731
Bug: 201546136
Test: atest CtsUiRenderingTestCases:RuntimeShaderTests
Change-Id: I627d5d7617b2a838a5d0c049f6fa1c2a5763e11f
Alternative approach to fab15e55446080bdcfc05ba315e8ef914b0a6f65 which
was racy because the disconnect callback is called without the
BQ lock and the client can continue to modify the BQ state after
disconnecting from the queue.
This approach resets the BQ and BBQ states when the SurfaceControl is
updated. This solves one concrete problem of not relying on the old
SurfaceControl to be destroyed in order to release the currently presented
buffer back to BQ.
In addition this change resets the sync state in BBQ with the rationale
the system does not want to sync on buffers presented on an older
SurfaceControl.
Bug: 197269223
Test: atest BLASTBufferQueueTest
Test: labtest ag/16407859 cf-foldable * 3 (b/197269223#comment40)
Change-Id: I137d3284c4e9216963f9c672f192afd334501ee5
FrameCallback sends back the syncStatus and allows the caller to return
a FrameCommitCallback. This is so the caller can evaluate the results of
the sync and determine if it wants to continue waiting for a commit
callback. In cases, where the sync has failed, there will never be a
commit callback so the caller can avoid waiting.
This is partically helpful for VRI because it wants to sync with a frame
that will draw, but also doesn't want to get stuck indefinitely waiting
on the callback. VRI can check the syncStatus and only handle blast sync
and/or reportDraw when its determined that a draw will happen.
This allows VRI to remove frameCompleteCallback since it can now wait
until a buffer has drawn instead of when the vsync has completed. This makes
sure it waits on FrameDropped since that result indicates HWUI will draw on
the next vsync
Test: BlastSync
Bug: 200284684
Change-Id: Ic6e2f08ea21ac8a1634a3389c927fcb68ede3f7b
Revert "Add tests to ensure hardware only for RuntimeShader API"
Revert submission 16475336-RuntimeShader_softwareOnly
Reason for revert: Breaking tests as system is dying
Error: Software rendering doesn't support RuntimeShader
Bug: b/211066630
Reverted Changes:
Id0ee4d1f0:Enforce that RuntimeShader is only hardware accele...
Ib4c2e54bd:Add tests to ensure hardware only for RuntimeShade...
Change-Id: Id7bbf2609a06c1cd69f6a457dab44f9478d95742
Throw an illegal argument exception any time a Paint with
a RuntimeShader is attempted to be drawn into a software
canvas. Also mark that a Picture that uses a RuntimeShader is
properly marked as requiring hardware acceleration.
These tests check that the use of RuntimeShaders trigger
Bug: 189102731
Bug: 201546136
Test: atest CtsUiRenderingTestCases:RuntimeShaderTests
Change-Id: Id0ee4d1f05e2975031121298b45f925ee74f6818
In addition to exposing the API to the SDK this CL expands the
number and type of APIs available to modify the uniforms. For
uniforms that resolve to the primitive types of 'float' or 'int'
there are five different entry points for each whose purpose is
twofold. First, these entry points map directly to the GLSL
types (e.g. float, vec2, vec3, vec4, float[]) that these uniforms
are bound to. Second, for animations these uniforms can be updated
every frame and avoid unnecessary java array allocations was also
motivation for using this pattern instead of varargs.
Bug: 189102731
Test: atest CtsUiRenderingTestCases:RuntimeShaderTests
Change-Id: I4870acd7656095c9d413e708a3150c10134e8afd
Clipping Views to Outlines has existed for several releases,
as has providing a Path for shaping Oulines. However, using
a Path-shaped Outline to clip a View against was specifically
disabled internally, due to historical functionality limitations
(prior to enabling Skia for HWUI rendering) as well as performance
concerns.
On current (even relatively low-end) hardware, path clipping is now
sufficiently performant that we are enabling this functionality.
This functionality will be used by AndroidX APIs that enable easier
shaping via paths.
Bug: 201807515
Test: Manual testing including hwui performance tests and CTS
OutlineTest
Change-Id: Ic61d9393cb72c6ad3517954177e5037a383a0c4d
Fixes a case where the SurfaceView is stuck with a wrong
scale.
Destination frame scales the buffer to the SurfaceView
fixed size. Currently the initial destination frame is
applied when the first buffer is acquired by BBQ. The
transaction is sent via the BBQ apply token.
Meanwhile if the client updates the SurfaceView fixed
size, the SurfaceView will apply the transaction via
the SCC apply token.
This can cause destframe changes to be applied out of
order causing the app to be stuck with the wrong
scale.
Bug: 195443440
Test: atest BLASTBufferQueueTest
Test: repro steps from bug
Change-Id: Ibf53a0efdebb87291d081e48633c373a98d347b1
Merged-In: Ibf53a0efdebb87291d081e48633c373a98d347b1
Fixes a case where the SurfaceView is stuck with a wrong
scale.
Destination frame scales the buffer to the SurfaceView
fixed size. Currently the initial destination frame is
applied when the first buffer is acquired by BBQ. The
transaction is sent via the BBQ apply token.
Meanwhile if the client updates the SurfaceView fixed
size, the SurfaceView will apply the transaction via
the SCC apply token.
This can cause destframe changes to be applied out of
order causing the app to be stuck with the wrong
scale.
Bug: 195443440
Test: atest BLASTBufferQueueTest
Test: repro steps from bug
Change-Id: Ibf53a0efdebb87291d081e48633c373a98d347b1
When the main window gets a configuration change, the new buffer for the
SV will get applied in the same transaction as the main window. This
will allow apps to implement seamless rotation without a frame or more
of black where the SV was resized, but the buffer was not yet updated.
This also includes an optimization where if only SV change occurs, but
there was no request from WMS to report drawing, VRI can apply the
transaction immediately without reporting to WMS.
Test: SV with seamless rotation enabled
Bug: 200284684
Change-Id: I5569d815eef92acf3bf9d7f753bd5ab94a332cfe
The previous code waited for a frame complete callback from hwui before
notifying WMS that a draw had occurred. However, frame complete callback
was not guaranteed to get called since it only invokes a callback if a
draw actually occured. VRI really needs a signal that RT has completed,
since it just needs to know that a draw was possible so it can notify
WMS that the RT completed its pass.
Instead, rename frameCompleteCallback to frameCommitCallback since that
API is exposed to a public API when a frame was actually drawn.
Create a new callback, frameCompleteCallback, that is invoked when the
draw has completed, regardless if a frame was actually drawn.
When the frameCompleteCallback is invoked, VRI can check to see if a new
frame actually drew. VRI can call into BBQ to see if the frame acquired
matches the frame that was attempted to draw. If so, VRI can wait on a
transaction callback. If not, it can allow VRI to continue. In either case,
it will notify WMS that the draw has finished.
Test: Split over and over
Bug: 195262673
Bug: 193634619
Change-Id: I24dd19ab2746be3fc33e597761abf8c5249f8b5b
Merged-In: I24dd19ab2746be3fc33e597761abf8c5249f8b5b
Also implement getDataSpace functions in SurfaceTexture and Image field
to help with upstream HDR work.
Bug: 201539996
Bug: 201535454
Test: android.hardware.camera2.cts.ImageWriterTest, android.hardware.cts.DataSpaceTest pass
Change-Id: I17fa43c1ba60e6f59da1910cebcef0dab993ce3b
The variable nextTransaction is abigious and doesn't represent its
purpose. Rename to syncTransaction
Test: Builds
Bug: 200285149
Change-Id: I55c3efe02aee17a610034bb5eb011e98e7747d7c
It's already a noop, we just never cleaned up the
frameworks/base side.
Bug: 200285149
Test: Existing tests pass
Change-Id: I7d79404f93a9386b16fb9770bbd7290dfb236cc0
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
There are no longer an uses for BBQ.setTransactionCompleteCallback so
remove from code.
Test: Builds
Bug: 200285149
Change-Id: I1eea54ac53b4f8514ea11116e6839a39acf51e68
For P010 format, Each pixel has Y and subsampled CbCr. So:
bitPerPixel = 1.5 * bitPerPixelY
bitPerPixelY = 16 bits
Bug: 200949749
Test: Camera CTS
Change-Id: I7964d64c25961dbef634ac1ef82898147ec57111
flushShadowQueue no longer does anything in BBQ so remove from Java and
JNI code.
Test: Builds
Fixes: 199204968
Change-Id: I4df67a23732ba4ffaca42390b29d3f81cadd6457