Age | Commit message (Collapse) | Author |
|
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
|
|
Test: cts
Change-Id: I9a3314bc3f221b6e884c8c84d7b0241f7c5be600
|
|
Bug: 137581257
Test: builds
Change-Id: Ib38f85c11be332e6cd784f8bbf55f58cde72ac09
|
|
Bug: 129117085
Test: skia unit tests and test cases described in the bug
Change-Id: Ieaa7c831dd6298ac0565e6f1837b1c1dbd4545da
|
|
Test: make
Change-Id: Ib342878524b51d0eacf6c60ece3c7da8bf27d2c0
|
|
Rely on builder to compute it
Test: make
Change-Id: Ib04b5a79d4e94e269761dd23171ca517e5aebed9
|
|
Test: CTS
Change-Id: I974fad5a7a8cf54007f0a30f4fe4ae6eb6e01ae1
|
|
Test: make
Change-Id: Id5864591db0577a24833bbb90036b9554ce130d4
|
|
Test: make
Change-Id: I9c041497688b2657e153eeda4c895cd810fd7f94
|
|
Instead of allocating a separate renderTarget and switching
between them on each draw the new implementation follows the same
pattern that the old HWUI renderer used. The area of the layer is
now copied to a buffer on the GPU, the area is then cleared, rendered
as normal, and finally the texture is redrawn using dst_over blending.
This results in no render target switches and is considerably faster
on some hardware.
Test: CtsGraphicsTestCases, CtsUiRenderingTestCases
Bug: 119222339
Change-Id: I716aac1fc31e4c7a171373d37dee82034c01cf18
|
|
Test: make
Change-Id: I699aa495573e410043caaf97599172471fe8895d
|
|
|
|
Test: make
Change-Id: I8605b03098f8fe1d255d3e4d690680c52baf2352
|
|
Also for a canvas wrapping a bitmap the colorspace of the bitmap
will be used to correctly blend content.
Test: CtsUiRenderingTestCases
Bug: 111436479
Change-Id: I63ad7a30605a7f725cc0ef4716d42ea978fb03e3
|
|
Test: make
Change-Id: I35633b0a43b68b4784d8f253a9c37d1d8da7dc87
|
|
Exposed Skia's underlying drawDRRect method used to draw a double
rounded rectangle
Bug: 117181396
Test: Added test case to verify Canvas#drawDRRect and re-ran CanvasTests
Change-Id: I4e1954c8ffc82811dc541488d1df9b37309faf51
|
|
Skia is removing SkDrawFilter.
Test: refactoring CL. Existing unit tests still pass.
Change-Id: If81c1a2feabf7d377ae1d7bcb3e8cf0f599ad3ce
|
|
Move all HW bitmap upload operations off of RenderThread.
Ensure EGL context outlives all upload requests
Bug: 79250950
Test: builds, boots, systrace is good, CTS bitmap tests pass
Change-Id: I5ace6c516d33b1afdf1a407cd8b183f6b60c22c1
|
|
Test: hwuiunit & CtsUiRenderingTestCases pass
Change-Id: Ie7b336eacdd1b8660e09653c64eb6ea0a7b4a258
|
|
This is only a partial fix for the bug, but does ensure that Skia
doesn't attempt to realign the text after minikin already has.
Test: CtsGraphicsTestCases and test app in bug.
Bug: 25360203
Change-Id: I6222963b23b910f0261f562f8816604575d540fa
|
|
Dew to a side effect of HWUI opengl pipeline, the hairline stroke
is not respected, but it is drawn as a fill style. Implement the
same behaviour for skiagl pipeline with SDK API 27 and older.
On SDK released with Android P, the hairline stroke is respected.
Bug: 72494357
Test: Ran duolingo app
Change-Id: I48bdcf3ddec4bf65b5e93e01c5002177c4e3da90
|
|
Test: make
Change-Id: I39e41a80430dca7878e6983b098c1c4541904fd1
|
|
The current implementation schedules the next frame of the images
to be decoded after the current frame completes but potentially
schedules tasks that will result in a no-op execution if a new
frame is not yet needed.
Test: HwAccelerationTest
Change-Id: I0510cb5a1b801abd651327e924deb586af0306d6
|
|
Bug: 63909536
Bug: 63908092
Test: TODO
If ImageDecoder.decodeDrawable is called with an animated image Source
(currently GIF or WebP), return an object of a new (hidden) Drawable
subclass. The new Drawable animates, and it implements Animatable (TODO:
implement Animatable2) so users have some control over the animation.
In addition to the normal features of Drawable, this new one supports
many of the features of ImageDecoder, including scaling, cropping and
PostProcess, which enables circle masks/rounded corners and other
arbitrary after-effects. It does *not* support decoding directly to a
Hardware Bitmap, since it cycles through frames and reuses the same
bitmap memory. But it could be made to use shared memory (TODO?).
TODO: Use a better number for the native allocation registry
TODO: Use the RenderThread to drive the animation, and remove decoding
on the UI thread.
TODO: Add support for modifying the loop count
Android.bp:
- build new AnimatedImageDrawable.cpp
AndroidRuntime.cpp:
- register new native methods
AnimatedImageDrawable.java
AnimatedImageDrawable.cpp:
- new Drawable that handles animated images
Canvas.h, SkiaCanvas.h/.cpp
- New virtual method and implementation for drawing SkAnimatedImages
RecordingCanvas.h/.cpp
- Stub implementation of drawing SkAnimatedImages
ImageDecoder.h/cpp
- Allow code sharing with AnimatedImageDrawable.cpp
- postProcess
- access the ImageDecoder struct
Depends on https://skia-review.googlesource.com/c/skia/+/94660 in Skia.
Change-Id: Ie2ec98d9c52deda4d439c6ef8e5dea2861bb93a3
|
|
Align glyph to a tangent touching SkPath in the midle of the
symbol. Previously wrong tangent crossing the path at the
beginning of the glyph was used.
Test: Ran the test app attached to the bug
Bug: 71525360
Change-Id: I310394d11e185de314f66a6b332f804188e42ed9
|
|
Pass a hint to Skia, about which lattice rectangles are solid
color rectangles.
Bug: 69796044
Test: Measured ninepatch performance using sample app from the bug
Change-Id: Ib07b1b64c78ab16195f9af88a989d28682084565
|
|
Fix crash in macrobench tests, caused by incorrect text encoding.
Test: Ran macrobench tests
Change-Id: I3522004f70c7037299fb92157ac8633ebb170131
|
|
Skia's drawArc API is defined to keep winding when drawing an arc
with a sweep angle > 360. This allows for special path effects
and for points on the arc to potentially be double drawn. This is
not the case for the HWUI implementation that optimistically turns
the call into a drawOval. This CL updates Skia's pipeline to be
in line with the HWUI implemenation.
Test: CtsGraphicsTestCases were added to cover this
Bug: 68764873
Change-Id: I22cd15a53cd2df44421518256d45a2b5d0525a86
|
|
Test: No code changes, just ran through clang-format
Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
|