History log of /frameworks/base/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4afdd1caa4ff5f0890c3f4d73c6d475f9e06cefd 14-May-2018 Leon Scroggins III <scroggo@google.com> AnimatedImageDrawable: Eliminate unnecessary calls to redraw

Bug: 78866720
Test: Manual + systrace; existing CTS

Previously, we set hasAnimations to true when the AnimatedImageDrawable,
so that we would get a call to redraw. But if the image does not need to
show its next frame yet, the redraw was unnecessary.

Instead, add a new field to TreeInfo::Out, representing the delay time
until the image will need to be redrawn - i.e. when the duration of the
current frame has passed. Each call to prepareTree will post at most one
message to redraw, in time for the earliest animated image to be
redrawn. Post the message for one rendered frame ahead of time, so that
when it is time to show the next frame, the image has already gotten the
message to update.

On a screen with a single animated image, this drops the number of calls
to dispatchFrameCallbacks to as infrequent as possible. It is called
only when we need to draw a new frame of the image. On a screen with
multiple animated images, the calls may be redundant, but they will not
be more frequent than they would be without this change.

Switch to nsecs_t and systemTime internally, matching the rest of HWUI.

Remove mDidDraw and related. Its purpose was to prevent advancing the
animation while the image is not being drawn. But it isn't really
necessary. If it's not drawn, onDraw is not called, which is where we
trigger decoding. And onDraw already has a defense against getting too
far ahead - if its timer indicates that it should skip a frame or show
it very briefly, it will back up its timer. More importantly, mDidDraw
caused a bug, when combined with less frequent redraws. If the display
list containing the drawable doesn't need to be redrawn for other
reasons, the drawable's timer never advanced, so its animation stopped.

Fix software drawing. Compute the milliseconds in the future to draw the
next frame, and add that to SystemClock.uptimeMillis() to compute the
time to pass to scheduleSelf.

Change-Id: I13aab49922fa300f73b327be25561d7120c09ec4
/frameworks/base/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
5b7f426ff04820f81877ccb696bf6245dede89e7 26-Jan-2018 Leon Scroggins III <scroggo@google.com> Use a separate thread to decode AnimatedImageDrawable

Bug: 63908092
Test: Manual: Ie18811ba29a1db163aca08472b04ae185e9344f0

Depends on https://skia-review.googlesource.com/#/c/skia/+/101544. That
change removes the Skia class's time checks, and leaving it up to the
client to keep track of the time. In this case, the client wants to keep
track of the time because it only wants to update while it is being
drawn. If it goes off screen (for example), it will just resume where it
left off when it returns on screen. This allows for smooth animations.

If an AnimatedImageDrawable is being drawn to a SkiaRecordingCanvas,
decode on the new (lazily-created) AnimatedImageThread.

When running, always decode one frame ahead on the AnimatedImageThread
so that it will be ready when it is time to display.

During prepareTree, update the time and check whether there is a new
frame ready to draw or the next frame needs to be decoded. In either
case, return true. The next frame to be decoded will be triggered by
onDraw.

Change-Id: If447976e9df417060a950f658dbca9cf7980dd02
/frameworks/base/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
2d14213849d6df70d0fa80319ab4ffc08743a683 22-Jan-2018 Derek Sollenberger <djsollen@google.com> Initial implmentation of AnimatedImageDrawables on the RenderThread.

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
/frameworks/base/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
1bcacfdcab0eaa0cee92bd7f5a1b5e271dd68e52 03-Nov-2017 John Reck <jreck@google.com> Format the world (or just HWUI)

Test: No code changes, just ran through clang-format
Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
/frameworks/base/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
23c38a9ed9c28a9fda438e7d30532aad7a3844f7 23-Mar-2017 Stan Iliev <stani@google.com> Update VectorDrawables cache at frame start

Draw VectorDrawables in GPU backed surface. Render VD cache
at the beginning of the frame to avoid context switching.

Test: CTS graphics tests pass.
Change-Id: Ia14e0ec4049c3fa87f03547fbda44043bf8dd793
/frameworks/base/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
ea1fe9b9d6ff9f0a543489979a0a909acc9ea564 01-Mar-2017 Derek Sollenberger <djsollen@google.com> Update SkiaDisplayList to use the modified SkLiteDL

SkLiteDL is no longer refcounted or a subclass of SkDrawable.

Test: on device testing in SkiaGL mode
Change-Id: I9ad53d764a26ab382d80d54908325962f2075802
/frameworks/base/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
d21723704571dba7e69947d92856f22989d53dbf 09-Feb-2017 Stan Iliev <stani@google.com> Implement "dump displaylist" button for skia pipelines

Implement "dump displaylist" button in hierarchyviewer for skia
pipelines.

Test: ran hierarchyviewer for all pipelines.
bug: 34819877
Change-Id: Ifeb578260f636cb67268f9f9259e7318bf7de453
/frameworks/base/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
2de950d5a8b47c7b4648ada1b1260ce4b7342798 25-Jan-2017 John Reck <jreck@google.com> Overhaul RenderNode's DisplayList management

* Move mValid to native
* Have destroyHardwareResources destroy everything
* Remove flaky mParentCount checks in setStaging
* All tree updates have an internal observer to
ensure onRemovedFromTree() is a reliable signal
* onRemovedFromTree() immediately releases resources
to avoid displaylist "leaks"

Test: Unit tests for validity added & pass, manually
verified that b/34072929 doesn't repro

Bug: 34072929

Change-Id: I856534b4ed1b7f009fc4b7cd13209b97fa42a71c
/frameworks/base/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
db45a4bfaff1120a9b23073e46a0cc6d39f56023 08-Nov-2016 Stan Iliev <stani@google.com> Fix Skia render node projection to match HWUI

Fix Skia render node projection to match HWUI. Port
FrameBuilderTests_projectionReorder test for Skia pipeline.
Add new tests in both HWUI and Skia to cover more projection
use cases.

Test: built and run on angler-eng
Change-Id: Ibf27af211452ae95d595aca7723ea63f48b0b282
/frameworks/base/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
189e87498f666e94dc8c8201e7bac56bb09b9251 16-Nov-2016 Derek Sollenberger <djsollen@google.com> Update pinImages to report when GPU resource limits are exceeded.

Bug: 32691999
Test: proposed CTS test (ag/1500396) and existing UiRendering tests
Change-Id: I190f888ae5499ac048569af8256fdd31d19d1285
/frameworks/base/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
b7d34b64dd32e3d84bd43344c9c3d9ad098129af 04-Nov-2016 Derek Sollenberger <djsollen@google.com> Refactor pin/unpinImages to work across pipelines.

Test: existing CTS tests still pass
Change-Id: Ib2607e9853396bad42f298829b5c5da0d210af32
/frameworks/base/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
021693b967a2c5556dddd183eb0247df4079e1ad 17-Oct-2016 Stan Iliev <stani@google.com> Implement SkiaRecordingCanvas, RenderNodeDrawable and other drawables.

Implement SkiaRecordingCanvas, RenderNodeDrawable, GLFunctorDrawable,
LayerDrawable, StartReorderBarrierDrawable, EndReorderBarrierDrawable.
Move AnimatedRoundRect and AnimatedCircle in a separate file.
All Skia pipeline files are moved in hwui/pipeline/skia folder.
Add unit tests for RenderNodeDrawable, StartReorderBarrierDrawable,
EndReorderBarrierDrawable and SkiaRecordingCanvas.

Test: I tested manually on 6P devices and did run the unit tests.
Change-Id: If2a347bd1fc4689953822294ce5bf98c7f3f57c7
/frameworks/base/libs/hwui/pipeline/skia/SkiaDisplayList.cpp