277 Commits

Author SHA1 Message Date
Anton Hansson
ab6ec61251 frameworks/base: Set LOCAL_SDK_VERSION where possible.
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
2018-02-28 15:13:23 +00:00
John Reck
519ad488a5 Switch to public API version
Use the public API version of the same thing that the private API
access was doing. No behavior change.

Test: built
Change-Id: I4a9032cfb1d4e699f72df3b079ef363d308419e8
2018-02-12 17:30:02 -08:00
John Reck
d8be4a0abe Add API to set tonal shadow color
Bug: 68211332
Test: HwAccelerationTests's coloredshadow demo & CTS test in topic
Change-Id: I09f5d1067b3200564a9d47219f70985edf3a2527
2018-01-31 11:28:11 -08:00
John Reck
3c0369bf02 Create colored shadows demo
Test: HwAccelerationTest demo
Bug: 68211332
Change-Id: Ia53a6ac2854570d0495b355bbebee1dcec2f47ba
2017-11-13 16:53:48 -08:00
John Reck
1fedd91687 Creating HW bitmaps from RenderNode
Allows creating a HW Bitmap from the drawing
commands of a RenderNode.

Bug: 38507414
Bug: 37698012
Test: Sample in HwAccelerationTest

Change-Id: I57c60b2c8bf5194f4412ad4b7f1c1f35e2e4c757
2017-05-24 22:10:40 +00:00
Alan Viverette
51efddbd3b Remove unnecessary casts on calls to findViewById
Just frameworks/ this time. More paths to come.

Bug: 24137209
Test: make -j32
Change-Id: Iff27abd26fa43296ac2fff8f534fc6742d2ae80c
2017-04-14 11:15:50 -04:00
Chris Craik
6097eca721 Expose color filter mutate methods
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
2017-03-16 15:45:43 -07:00
Narayan Kamath
a444636d39 Merge "MathUtils: Remove static Random field." 2017-03-09 11:13:39 +00:00
Joachim Sauer
40034ccac1 Merge "Renaming Czech Republic to Czechia." am: 33bade08de am: 260b81aaf2
am: d06f548226

Change-Id: Ie7c7c3415738623c184e2e9e96d85cbe05cbfee7
2017-03-08 17:50:44 +00:00
Narayan Kamath
b192344234 MathUtils: Remove static Random field.
This is unsafe because the random will be seeded in the zygote, which
means all processes on the system generate the same sequence of random
numbers. Fortunately, this code is only used in tests, so get rid of it.

Note that the Random that backs Math.random() is reseeded after every
fork to avoid a similar issue.

Bug: 35918685
Test: HwAccelerationTest
Change-Id: Ice79aa25bb9017f7a0b91659afe04112850cb74b
2017-03-08 10:07:03 +00:00
Fredrik Roubert
45ded8f6ba Renaming Czech Republic to Czechia.
Bug: 34964100
Test: ?
Change-Id: Ifbf0a52d15e3d735404be49c6934775589ecdfd6
2017-02-23 17:30:14 +01:00
John Reck
912bebeb74 Fix window copy for rotation = 90/270
Bug: 33421965
Test: Manual via PixelCopyWindow test in HwAccelerationTest
Change-Id: I2a59fd6a26499635a22444e124cd1ec6f82f6e31
2016-12-08 11:22:31 -08:00
John Reck
6bc7014210 Add SurfaceHolder#lockHardwareCanvas()
Bug: 26988043
Test: SurfaceViewTests#testSurfaceHolderHardwareCanvas CTS test
Change-Id: I3e5352d498dbe2fc56a18ca27360d129a14c7784
2016-10-27 14:13:44 -07:00
Stan Iliev
45faba516e Fix wording regarding ThreadedRenderer
ThreadedRenderer is not synonymous with hardware rendering, so
remove references to hardware rendering when referring to
ThreadedRenderer.

Change-Id: Ic66a482ccf05f556ebe6ec194ce4f858f75bbb8b
2016-06-28 16:40:05 -04:00
Aurimas Liutikas
63999da503 Switch the default text selection handles to Material style.
-Switch to material style handles.
-Delete old handles.
-Remove the unrelated use of old handle in a test.

Bug: 28723844
Change-Id: I268c2672df541e5a1cdcdeb6712289fe06c06d5f
2016-05-11 16:43:37 -07:00
John Reck
6d42b5c6e3 Merge "Support transform'd GraphicBuffers" into nyc-dev 2016-04-29 14:49:21 +00:00
John Reck
a1c06675dd Merge "Video source test & bugfix" into nyc-dev 2016-04-29 14:49:13 +00:00
John Reck
2f69d6d4fd Support transform'd GraphicBuffers
Bug: 28428955
Change-Id: I23e2fc9b96a67c7cfda42d9d7319e478194a7fa7
2016-04-28 13:32:27 -07:00
John Reck
f3a51d652f Video source test & bugfix
Bug: 28428970

Test for video sources and fix a bug where
we should throw an IAE for surfaces that are invalid
at request time.

Change-Id: I891a2b1568f583300433c7aca6de36d2e2621c63
2016-04-28 10:11:36 -07:00
Hyunyoung Song
137e30ae7b Merge "Revert "Revert the default wall paper for framework / emulator b/27451024 Change-Id: I68ed094f44f1b4c48407497790f809147ec0ad5a"" into nyc-dev 2016-04-28 16:57:26 +00:00
Hyunyoung Song
8398e8261e Revert "Revert the default wall paper for framework / emulator b/27451024 Change-Id: I68ed094f44f1b4c48407497790f809147ec0ad5a"
This reverts commit fcef23e831df0153fab7a3462973f0906ce9b8d8.
Bug: 28028331
Change-Id: I0bbcf7024749d06b7d78574afbb9625e6de8b96d
2016-04-28 16:50:11 +00:00
John Reck
7f209d37f1 Merge "API tweaks to PixelCopy and make it public" into nyc-dev 2016-04-27 14:36:53 +00:00
John Reck
e94cbc76d5 API tweaks to PixelCopy and make it public
Bug: 27708453
Change-Id: I81667ce42f9ca1c1a13e1e61299927900845fc84
2016-04-26 15:41:43 -07:00
Chris Craik
0e974e7425 Improve SurfaceView postion snapping
bug:27098060

Snap SurfaceView positions to safely align to pixel boundaries.

Also expands MovingSurfaceViewActivity to support a scaling option, and
show problems more clearly.

Change-Id: Ic8e9c1e2f80c2c653bf4428e373f14528ddbce81
2016-04-22 15:48:17 -07:00
John Reck
10dd0585c1 Framework-side of SurfaceView#getBitmap
Bug: 27708453

Change-Id: Ie6fd7eca522d3e6549d8af587c975fd7e6053649
2016-04-11 16:00:22 -07:00
John Reck
417ed6d433 Fix missing first frame
Bug: 26776366
Change-Id: I46258c0ff35fdefe5c9f2ee610c904b2dbe8c5d9
2016-03-23 07:59:10 -07:00
Hyunyoung Song
5d634d7828 Merge "Revert the default wall paper for framework / emulator b/27451024 Change-Id: I68ed094f44f1b4c48407497790f809147ec0ad5a" into nyc-dev 2016-03-02 22:54:05 +00:00
Hyunyoung Song
fcef23e831 Revert the default wall paper for framework / emulator
b/27451024
Change-Id: I68ed094f44f1b4c48407497790f809147ec0ad5a
2016-03-02 11:50:16 -08:00
Chris Craik
b67985f337 Merge changes I4f72448f,I74b7233c into nyc-dev
* changes:
  Fix ripple positioning within scrolled node
  Clip projected ripples to outlines
2016-03-02 18:52:35 +00:00
Chris Craik
678ff81105 Clip projected ripples to outlines
bug:27343928

Also fixes positioning of ripples to a scrolled projection receiver.

Change-Id: I74b7233c46d7c15839ca8bf50e188ba6646d7432
2016-03-02 10:29:15 -08:00
Hyunyoung Song
d9f91827a9 Update wallpaper asset for N dev preview
Bug: 27434845

Change-Id: I0f9ff168beab12d630ab824ab632f98051564570
2016-03-01 20:39:03 -08:00
John Reck
f648108f83 Have RT drive window positioning
Bug: 22802885

Change-Id: I6beed5474d3a943b16e9097f7bd61ce3cbd37505
2016-02-04 11:23:49 -08:00
John Reck
51aaf906f9 Nuke HardwareRenderer abstract base
Bug: 17303292

Change-Id: I4a272ea4f695f4f9993e8be640fdd8530b691be0
2015-12-02 15:46:11 -08:00
Skuhne
b816087962 Rendering the window frame with a second thread
Using a multi threaded render node to render the window frame
asynchronously from the application relayout.

Bug: 22527834
Bug: 24400680
Bug: 24459827
Bug: 24409773
Bug: 24537510
Change-Id: I1010fc6a8b6e38424178140afa3ca124433ab7e4
2015-10-02 07:11:45 -07:00
Skuhne
ea7a7fb75a MultiThreaded rendering of different renderNodes
This is adding the renderer side infrastructure to allow
rendering multiple render nodes with different threads.
This is a pre-step for decoupling a non client decor
resize reder from a content resize render.

Multiple render nodes can be added to be drawn, and to
prevent overdrawing, a content bounds area can be set

Bug: 22527834

Change-Id: Ie7271e20895bf38957e5a84aeefc883e282039ad
2015-09-21 07:18:00 -07:00
Chris Craik
fca52b7583 Use path intersection instead of saveLayer+mesh to mask projected ripples
bug:14297149

SaveLayer's performance cost is high, and proportional to the surface
being projected onto. Since ripples (even unbounded ones) are now
always projected to the arbitrary background content behind them, this
cost is especially important to avoid.

This removes the last semi-secret, saveLayer from the projected
ripple implementation.

Also fixes the HW test app to correctly demonstrate this projection
masking behavior.

Additionaly, alters PathTessellator to gracefully handle
counter-clockwise paths, and simplifies the work done by
ShadowTessellator to ensure all of its paths are counterclockwise.

Change-Id: Ibe9e12812bd10a774e20b1d444a140c368cbba8c
2015-05-26 17:53:16 -07:00
Chris Craik
31a2d063df Revert "Revert "Merge getDisplayList and updateDisplayListIfDirty""
Fixes breakage from HwAccelerationTest

This reverts commit b2847afde24aac22c8fb804cdce0c24b8a7c40c4.

Change-Id: I762b3c9020fc1d06bac61ffa8b956049147515b1
2015-05-01 14:30:15 -07:00
Chris Craik
f6829a0a61 Remove HardwareCanvas
Change-Id: I239646a7f00f09d3f76fe6b6162eed86bc0d6e77
2015-03-10 14:56:11 -07:00
Chris Craik
36a35e366a Fix layer shader to store layer pointer
bug:19419672

Change-Id: I4277348ceab41fbf45a107a8b21f64e2b4af23e0
2015-02-18 17:47:21 +00:00
John Reck
c47c98be04 Fix issue with RNA destruction mid-animation
Bug: 18521508

Fix an issue where an RNA's native object was destroyed
before the java-side object was started

Change-Id: I487fb476e0ecdf7000515f4f7320e8cfbc50a52b
2014-12-09 12:35:12 -08:00
John Reck
bb2d0cc7e1 Surface:lockHardwareCanvas
Bug: 17440886

Change-Id: I1f2d98c63ec1a2814c2258cf7e0096139263770a
2014-10-21 13:23:56 -07:00
John Reck
f5945a0c8b Disable RT-anim for AnimatorSet
Bug: 17317184

 Unfortunately this will disable *all* RT animations in a scene,
 but we don't have more selective targetting currently

Change-Id: I57e1c0ae43957f45229473bdcdaf34c05825fab7
2014-09-05 15:58:26 -07:00
John Reck
119907cd25 Animator stuff
Bug: 17228458

Change-Id: Id884a429a512f9cd2be0ed16dbd0f10e92b4440d
2014-08-27 17:44:25 -07:00
John Reck
c01bd1167a Return Animator instead of ValueAnimator
Change-Id: I29a7cfdc7ffbb3a4d33f9e64f9d7ca791f5c947c
2014-07-19 02:00:15 +00:00
Chris Craik
31ba192dd2 Tweaks to outline API
b/15283203
b/16142564

Remove boolean return value chaining, as it's redundant with
the data in the Outline itself.

Change-Id: I3116e57cd1b35c98b74e95195117edd7e39fb2df
2014-07-19 00:13:59 +00:00
John Reck
d3de42cae8 Add RT-enabled reveal animator
Bug: 16161431

 Also re-writes RevealAnimator to avoid using any listeners internally,
 removing the logic around shadowing the update listeners.

Change-Id: I6ed8126398eed971a87f20bccb7584c9acafbb6c
2014-07-18 22:10:22 +00:00
Leon Scroggins III
ab87983a11 Simplify Shader.setLocalMatrix.
Previously, calling setLocalMatrix updated any Paint that had the
Shader attached. This depended on deprecated behavior in Skia. Use
new Skia APIs, and do not modify any Paints that use the Shader.

In addition, update callers to call setShader (again) after modifying
the Shader.

Sample app at ag/499573 for testing.

Depends on I673801444f0a8fd4f192b5b7effdde1aa83e702b in external/skia.

BUG:14315916
Change-Id: I3c3316377874e89fccc85afb864bc038b0ef3890
2014-07-10 18:01:22 -04:00
ztenghui
3994371aa3 Draw overlapping rectangles with color modulated.
Touch the screen to turn on / off depth test.
Disalbe the vsync to get the real performance.
Drawing 10 rectangles on N10 show almost 3x perf gain, in this setup.

Change-Id: I97bb84f744e90c35febad8cb853ed877cda5e64f
2014-06-30 15:42:49 -07:00
ztenghui
b4dabadd89 Preparing the new GL depth test.
Right now, the code is just copied from ApiDemos for the initial setup.

Change-Id: I531f95faca744c7e91fadae189818af3d04a85ee
2014-06-30 13:11:40 -07:00
John Reck
c6b3264e16 Add setStartValue to RNA
Bug: 15198607
 Should be good-enough for Ripples to use for pseudo-chaining
 support.

Change-Id: Ia8666928ccb69ae401cb583751632a52bd928b63
2014-06-02 11:00:09 -07:00