Add force-dark support to RippleDrawable by modifying the ink color.
Test: manual
Test: atest CanvasOp
Fixes: 186130682
Change-Id: I89eaaf3afa5ec53a74d2d08de8cff6484e55a912
--Updated HWUI holepunch logic for SurfaceView to
also apply the stretch to the hole punch
--Updated RenderNode callbacks to also include
an offset from the ancestor RenderNode that also
has a stretch configured on it
--Added new test activity to verify hole punch
logic
Bug: 179047472
Test: manual
Change-Id: Ibbaf8248a31839ba9dc352ecb9fef54e1276918e
Fixes: 186758538
Relnote: "Removes edge effect type from the API -- EdgeEffect now
supports only stretch edge effect for all applications."
Test: existing tests, modified to work with stretch
Change-Id: Iec7a9d4a0316ff3ba7297c4565bb881a1adcf949
This enforces stricter rules on the SkSL at effect creation time, and
ensures it's valid as an SkShader (vs. an SkColorFilter). Also updated
some SkSL that was already (or would become) illegal:
- Child shaders must be declared 'uniform', not 'in'
- sampling a child requires coordinates
Bug: skia:11813
Change-Id: I743b985b5012723186a43e58e9e3ccf29d809d2b
(cherry picked from commit 7556777511)
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
Added dampening logic to caluclate the distance to
overscroll.
Updated StretchEffect to support independent
maximum stretch amounts for the x/y axis
Removed debugging parameters to configure
stretch distance since they are no longer
used. Removed hidden API calls to configure
stretch distance in ScrollView/HorizontalScrollView
Bug: 179047472
Test: re-ran EdgeEffectTests
Change-Id: I4698669273d364695a21c2cce00ec2cfec41b2cc
--Ported SKSL based stretch shader from OpenGL prototype
--Hooked up the stretch APIs in RenderNode to the stretch
shader.
--Updated RenderNode layer logic to promote the RenderNode to
a layer if there is a stretch to be applied to it in order
to feed the layer as input to the stretch shader
Bug: 179047472
Test: builds + sample overscroll stretches + updated CTS test
Change-Id: I744ff70099fe251ce07f23d067bf13444a468c08
Added RenderEffect.createShader to handle creation
of RenderEffects using shaders as inputs that can be
chained with other RenderEffects
Fixes: 178536866
Test: Added example in HwAccelerationTest activity
Change-Id: I4d9791ad63f3057ffa528918ce2cd083986089e5
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
Bug: 174932174
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.
Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas. Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:
-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage
Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance. With this extensive
effort, we've now improved our coverage as follows:
-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage
This specific change is automatically generated by a script that
identifies relevant "include" directives.
Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
This adds the ability for Java RuntimeShaders to provide other
shaders as inputs. This is a first pass API and should be updated
to mirror the SkRuntimeShaderBuilder API that enable callers to set
the uniforms and inputs shaders by name instead of passing arrays.
Test: HwAccelerationTests
Bug: n/a
Change-Id: I53a15ad864bede2fecc1e2459dca983d224114a0
Introduced RenderEffect API to handle consuming
SkImageFilter parameters on RenderNode objects
in order to support blur.
Updated SilkFX demo to use RenderEffect
APIs on RenderNode instead of BlurShader
Bug: 168549524
Test: Added tests to RenderNode CTS test cases
Change-Id: I5005a322a6d75438dd104e6915630264406cf771
Created BlurShader framework API along with
native implementation as an implementation of
the Shader wrapper that maps to either
SkShader or SkImageFilter
Bug: 143468037
Test: Added CTS test to verify BlurShader
Change-Id: I05fcf7ba79e9d552f8b0738f7382f7826cd94e21
With b/150232615, we will need an explicit value set for the exported
flag when intent filters are present, as the default behavior is
changing for S+. This change adds the value reflecting the previous
default to the manifest.
These changes were made using an automated tool, the xml file may be
reformatted slightly creating a larger diff. The only "real" change is
the addition of "android:exported" to activities, services, and
receivers that have one or more intent-filters.
Bug: 150232615
Test: TH
Exempt-From-Owner-Approval: mechanical refactoring
Change-Id: I4457ff2bd466a4c56fed2570e110f251031c2385
Replace the existing usages of now-deprecated API
WindowManager.getDefaultDisplay() with WindowMetrics or
Context.getDisplay() in frameworks/base.
Bug: 128338354
Test: Build, auto test
Change-Id: I02d38a022c5e0e6e9d699f03d35b65d6c8126da9
Bug: 129694386
Test: No change in behavior, no new tests
EdgeType is only used as a parameter to quickReject, but it is always
ignored. Deprecate it and the existing quickReject methods. Add new
versions of quickReject without EdgeType parameters. Switch clients to
the new versions.
Change-Id: Id932f10915a8c4959fe0e85f507ce7fd2da8a576
Add RuntimeShader hidden API, which calculates pixel output with
a fragment shader running on GPU.
Extend ColorFiltersMutateActivity HWUI test to use new API and
show how to animate uniforms on UI thread.
Test: Updated HwAccelerationTest
Change-Id: Ia26e44259b12099924facba250880cbbd9be21c7
As discussed with Romain Guy in the email thread, the Apache 2.0
license applies to the affected .jpg files now and retroactively from
the time of import.
Usage terms updated with exiftool:
$ exiftool -UsageTerms='Apache License Version 2.0' \
frameworks/base/tests/HwAccelerationTest/res/drawable-nodpi/very_large_photo.jpg
1 image files updated
$ exiftool -URL -WebStatement -UsageTerms -Rights -Creator \
frameworks/base/tests/HwAccelerationTest/res/drawable-nodpi/very_large_photo.jpg
Usage Terms : Apache License Version 2.0
Rights : Romain Guy
Creator : Romain Guy
$ exiftool -UsageTerms='Apache License Version 2.0' \
frameworks/base/tests/UiBench/res/drawable-nodpi/frantic.jpg
Warning: [minor] Fixed incorrect list type for XMP-xmpRights:UsageTerms - frameworks/base/tests/UiBench/res/drawable-nodpi/frantic.jpg
1 image files updated
$ exiftool -URL -WebStatement -UsageTerms -Rights -Creator \
frameworks/base/tests/UiBench/res/drawable-nodpi/frantic.jpg
Usage Terms : Apache License Version 2.0
Rights : Romain Guy
Creator : Romain Guy
Test: doesn't really apply to images
Change-Id: I3b9503efab871600512840531b477d3226432d58
As discussed with Romain Guy in the email thread, the Apache 2.0
license applies to the affected .jpg files now and retroactively from
the time of import.
The exiftool did not remove the old CreativeCommons metadata.
The images were altered using the bless hex editor to manually
overwrite the metadata.
$ exiftool -URL -WebStatement -UsageTerms tests/CanvasCompare/res/drawable/sunset1.jpg
URL : http://www.apache.org/licenses/LICENSE-2.0
Web Statement : http://www.apache.org/licenses/LICENSE-2.0
Usage Terms : Apache License Version 2.0
$ exiftool -URL -WebStatement -UsageTerms tests/HwAccelerationTest/res/drawable-hdpi/sunset1.jpg
URL : http://www.apache.org/licenses/LICENSE-2.0
Web Statement : http://www.apache.org/licenses/LICENSE-2.0
Usage Terms : Apache License Version 2.0
$ exiftool -URL -WebStatement -UsageTerms tests/HwAccelerationTest/res/drawable/sunset1.jpg
URL : http://www.apache.org/licenses/LICENSE-2.0
Web Statement : http://www.apache.org/licenses/LICENSE-2.0
Usage Terms : Apache License Version 2.0
Change-Id: Icbd8c8c65ca521751d63a213377e3ababff0b7da
As discussed with Romain Guy in the email thread, the Apache 2.0
license applies to the affected .jpg files now and retroactively from
the time of import.
'wallpaper_goldengate.jpg' and 'wallpaper_goldengate_scale.jpg' were
altered using the exiftool:
exiftool -WebStatement=http://www.apache.org/licenses/LICENSE-2.0
Each of the other images was altered using the exiftool:
exiftool -URL=http://www.apache.org/licenses/LICENSE-2.0 \
-WebStatement=http://www.apache.org/licenses/LICENSE-2.0 \
-UsageTerms='Apache License Version 2.0'
Change-Id: I52a032fc6aa6373d2fb0ea941e041ea72764268c
Allow views to register a list of rects where the device's system UI
should not intercept complex (read: down+move+up) gestures on specific
sub-regions of the view. This should not be used for large-scale,
full-view gesture recognition such as scrolling, but rather for specific
areas such as SeekBar's scroll thumb or DrawerLayout's edge strip for
swiping open a navigation drawer.
Add ability for ViewTreeObserver to observe transformed exclusion rects
Bug: 126360272
Test: atest android.view.cts.SystemGestureExclusionRectsTest
Change-Id: If89b6f66637e40efa12955d6408f6e37b25cb46f
See build/soong/README.md for more information.
Bug: 122332340
Test: treehugger
Change-Id: I23d8d5a019155a0f3296f7ab75e9b44b7621f3c8
Merged-In: I23d8d5a019155a0f3296f7ab75e9b44b7621f3c8
Removed PorterDuffColorFilter#setColor and PorterDuffColorFilter#setMode
as the public facing ColorFilter API is immutable. These framework
internal APIs were causing issues with Drawables as updates to state of
the ColorFilter would not be propagated up to the Drawable to cause an
invalidation.
Fixes: 77723600
Test: Ran atest on SystemUITest and CtsGraphicsTest modules
Change-Id: I935c9e35ffa225735b951bb3b1eb753ea5815a84
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.
Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.
Test: make relevant packages
Bug: 73535841
Change-Id: I4233b9091d9066c4fa69f3d24aaf367ea500f760
Use the public API version of the same thing that the private API
access was doing. No behavior change.
Test: built
Change-Id: I4a9032cfb1d4e699f72df3b079ef363d308419e8
Allows creating a HW Bitmap from the drawing
commands of a RenderNode.
Bug: 38507414
Bug: 37698012
Test: Sample in HwAccelerationTest
Change-Id: I57c60b2c8bf5194f4412ad4b7f1c1f35e2e4c757
Bug: 36025103
Test: cts-tradefed run singleCommand cts-dev --module CtsGraphicsTestCases
Now, similar to Shaders, we defer native creation until Paint is being
used, and ensure that we have an up to date filter when drawing.
Also implements ColorMatrix#equals to behave like Matrix#equals.
Change-Id: I5f74addd97f5662800802e6f660fead58d518725