History log of /frameworks/base/libs/hwui/renderthread/CanvasContext.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
df1742ed47da1e9b61afeae16fa448d5302a8aa0 20-Jan-2017 John Reck <jreck@google.com> Overhaul GraphicsStatsService

* LRU cache of recently-used is dead, replaced
disk storage
* ASHMEM size is read from native by the system service,
no longer requires keeping a sizeof() in sync with a
constant in Java
* Supports dumping in proto format by passing --proto
* Rotates logs on a daily basis
* Keeps a history of the most recent 3 days

Bug: 33705836
Test: Manual. Verified log rotating works by setting it up to
rotate every minute instead of day. Confirmed /data/system/graphicsstats
only has the most recent 3 entries after several minutes

Change-Id: Ib84bafb26c58701cc86f123236de4fff01aaa4aa
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
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/renderthread/CanvasContext.h
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/renderthread/CanvasContext.h
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/renderthread/CanvasContext.h
daf7229047c44947b9b02ee187fe5b13f30ebd4b 25-Oct-2016 Derek Sollenberger <djsollen@google.com> Move OpenGL specific details behind renderPipeline interface.

Test: new and existing unit tests still pass.
Change-Id: I6164f30f45ebe450788ed8d949eca5af9a44e585
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
98f75d53dbe243b1661c616643698e025d4978f6 25-Oct-2016 Derek Sollenberger <djsollen@google.com> Store GrContext on RenderThread for use by Skia-based renderers.

Test: built and booted on device
Change-Id: I4c1060ec72bc67e54e6b2d25b1f2c13aaa513f89
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
6e68bedacc3086f49b0cff6d20e006bcc6559603 13-Oct-2016 Derek Sollenberger <djsollen@google.com> Merge "Initial refactoring to enable the addition of the SkiaOpenGLPipeline."
253f2c213f6ecda63b6872aee77bd30d5ec07c82 29-Sep-2016 Romain Guy <romainguy@google.com> Linear blending, step 1

NOTE: Linear blending is currently disabled in this CL as the
feature is still a work in progress

Android currently performs all blending (any kind of linear math
on colors really) on gamma-encoded colors. Since Android assumes
that the default color space is sRGB, all bitmaps and colors
are encoded with the sRGB Opto-Electronic Conversion Function
(OECF, which can be approximated with a power function). Since
the power curve is not linear, our linear math is incorrect.
The result is that we generate colors that tend to be too dark;
this affects blending but also anti-aliasing, gradients, blurs,
etc.

The solution is to convert gamma-encoded colors back to linear
space before doing any math on them, using the sRGB Electo-Optical
Conversion Function (EOCF). This is achieved in different
ways in different parts of the pipeline:

- Using hardware conversions when sampling from OpenGL textures
or writing into OpenGL frame buffers
- Using software conversion functions, to translate app-supplied
colors to and from sRGB
- Using Skia's color spaces

Any type of processing on colors must roughly ollow these steps:

[sRGB input]->EOCF->[linear data]->[processing]->OECF->[sRGB output]

For the sRGB color space, the conversion functions are defined as
follows:

OECF(linear) :=
linear <= 0.0031308 ? linear * 12.92 : (pow(linear, 1/2.4) * 1.055) - 0.055

EOCF(srgb) :=
srgb <= 0.04045 ? srgb / 12.92 : pow((srgb + 0.055) / 1.055, 2.4)

The EOCF is simply the reciprocal of the OECF.
While it is highly recommended to use the exact sRGB conversion
functions everywhere possible, it is sometimes useful or beneficial
to rely on approximations:

- pow(x,2.2) and pow(x,1/2.2)
- x^2 and sqrt(x)

The latter is particularly useful in fragment shaders (for instance
to apply dithering in sRGB space), especially if the sqrt() can be
replaced with an inversesqrt().

Here is a fairly exhaustive list of modifications implemented
in this CL:

- Set TARGET_ENABLE_LINEAR_BLENDING := false in BoardConfig.mk
to disable linear blending. This is only for GLES 2.0 GPUs
with no hardware sRGB support. This flag is currently assumed
to be false (see note above)
- sRGB writes are disabled when entering a functor (WebView).
This will need to be fixed at some point
- Skia bitmaps are created with the sRGB color space
- Bitmaps using a 565 config are expanded to 888
- Linear blending is disabled when entering a functor
- External textures are not properly sampled (see below)
- Gradients are interpolated in linear space
- Texture-based dithering was replaced with analytical dithering
- Dithering is done in the quantization color space, which is
why we must do EOCF(OECF(color)+dither)
- Text is now gamma corrected differently depending on the luminance
of the source pixel. The asumption is that a bright pixel will be
blended on a dark background and the other way around. The source
alpha is gamma corrected to thicken dark on bright and thin
bright on dark to match the intended design of fonts. This also
matches the behavior of popular design/drawing applications
- Removed the asset atlas. It did not contain anything useful and
could not be sampled in sRGB without a yet-to-be-defined GL
extension
- The last column of color matrices is converted to linear space
because its value are added to linear colors

Missing features:
- Resource qualifier?
- Regeneration of goldeng images for automated tests
- Handle alpha8/grey8 properly
- Disable sRGB write for layers with external textures

Test: Manual testing while work in progress
Bug: 29940137

Change-Id: I6a07b15ab49b554377cd33a36b6d9971a15e9a0b
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
0df6209a02d0ea99d2dff3a46ed9febd5925df4b 27-Sep-2016 Derek Sollenberger <djsollen@google.com> Initial refactoring to enable the addition of the SkiaOpenGLPipeline.

Test: existing and new HWUI unit tests all pass.
Change-Id: I4f5c1dc839a2ed15d8b0f6245fe030684501b083
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
6a21ca5a4c6b62ae277ae6dcb14bc187460321a0 28-Sep-2016 Derek Sollenberger <djsollen@google.com> Move Layer creation/deletion into the RenderPipeline.

Test: refactoring. existing tests still pass.
Change-Id: I032c33896a0cb74c91e2a913a584373518466b88
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
7cae510f41d5c60da5fe83d9a0417ca6fc880df3 02-Sep-2016 Chris Craik <ccraik@google.com> Wait on frame work fences when frames are dropped am: 06e2e9cf4c am: 7a14f5aeb9
am: b53c60876a

Change-Id: Ib9c5be43f65379770b17260c34be90fccb360277
06e2e9cf4c3fe1eaac3271c9a346d5cc7fe5c3a8 01-Sep-2016 Chris Craik <ccraik@google.com> Wait on frame work fences when frames are dropped

bug:30895941

Prevents a race where frame work could interleave between frames,
causing SurfaceView position updates to be delivered out of order.

Change-Id: I01e4cc557b69dcf33e877a0e16c0d115ec95e4cc
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
56ad6ec42f814e9e61030ff819cac4e5d31def8b 22-Jul-2016 Derek Sollenberger <djsollen@google.com> Remove LayerRenderer.

There is only one caller each for the static functions here so this
CL moves the logic to the caller. Also by moving some of the code
into the pipeline it makes it easier for future changes to configure
how a pipeline handles a layer.

Change-Id: Ib735b5154325cbb658fd151f7a19dbf434ab44b7
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
cf3e1a7fa847e6895c3bc8d9549d2ed9ce736608 21-Jul-2016 Chris Craik <ccraik@google.com> Merge \\"Change swap chain stuffed detection logic\\" into nyc-mr1-dev am: 433a19e8bf
am: 3c37412900

Change-Id: Id7e0d1d1dfb5448dd927c29361fb98aabf0cfe10
3163568806f2f1c360f93772453f4b0b3a9b2e47 20-Jul-2016 Chris Craik <ccraik@google.com> Change swap chain stuffed detection logic

bug:29771461
bug:29413700
bug:30181577

Changes frame interval gap detection to look for wider gaps, as they
were incorrectly firing all the time.

Also adds a 500ms minimum gap between frames dropped because of stuffed
swap chain, to prevent dropping too often.

Change-Id: If16ed637d54bf37015704be102c5c2e3731a0824
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
b4c51cf024f705f104ef4a3f8cede2302806d72c 14-Jul-2016 Stan Iliev <stani@google.com> Merge "Move isSkiaEnabled to the Properties class"
768e39335b668e8ef25fef30ab42b2d6d29a4735 09-Jul-2016 Stan Iliev <stani@google.com> Refactor CanvasContext: move OpenGL specific code

Move OpenGL specific code from CanvasContext into a new class
OpenGLPipeline.

Change-Id: I4363053f890701a4235927b59ec588861488ea8f
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
8a33e4019991c58b06adf2e3a9ac1eeeccd8fa94 08-Jul-2016 Stan Iliev <stani@google.com> Move isSkiaEnabled to the Properties class

Move CanvasContext::isSkiaEnabled to Properties:isSkiaEnabled.

Change-Id: I0a62f43825cf59ba338a24a056e8c2a56d1c5315
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
5e00c7ce063116c11315639f0035aca8ad73e8cc 07-Jul-2016 Chris Craik <ccraik@google.com> Delete old rendering pipeline

fixes: 30002246

Change-Id: I45df0e924708526cee045b14c291bd23aa1a92db
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
a1a529eec0f1183c2dbb09d9c6fd12211154bebd 07-Jul-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Implement runtime switch to select default renderer mode"
03de074d05108fa9fb07c6b847c7163ada5776da 07-Jul-2016 Stan Iliev <stani@google.com> Implement runtime switch to select default renderer mode

Add a system property debug.hwui.default_renderer, which allows
to set rendering mode to OpenGL (default), Skia OpenGL or Vulkan.

Change-Id: I8bca5bacc5108f77437e340ac61f2d8db8cc4c39
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
e7f27fbf93ad0c26dfc6142ff1fde4a70b94aa23 07-Jul-2016 John Reck <jreck@google.com> Merge \\"Consider queue & dequeue times for should draw\\" into nyc-mr1-dev am: 3a465e7a12
am: 6354336493

Change-Id: Idbe85f08c27cc6f9433badd886a1fe7d9ba73c4f
0def73aac5956d82a065fd75e90eac4c58418e03 02-Jul-2016 John Reck <jreck@google.com> Consider queue & dequeue times for should draw

Bug: 29413700

Change-Id: I4b27b077af569e3c60c57b0e11501e9f3af70579
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
05357641d398ef77d880da387a230820ab3203fe 29-Jun-2016 Derek Sollenberger <djsollen@google.com> Remove unused method from RenderProxy and CanvasContext.

Change-Id: I324bbfa40a2155d0212fa20c6bd39df5bb21d27a
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
ab1080c4d075b008cebdd9a2031ebbd51f9c2729 22-Jun-2016 John Reck <jreck@google.com> Delete unused args

Bug: 21170575
Change-Id: Icc832f70f206342557f44667ad3498405d04db78
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
306f331f91a86da271ce30d4f14d6badf0d25704 11-Jun-2016 John Reck <jreck@google.com> Redraw if dirty during stopped when resumed

Change-Id: I0034d1da7704de53c4ba3da3e8ef3109445f9e6a
Fixes: 28283031
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
28912a508493e583c48772e2a234e0ed66849490 18-Apr-2016 John Reck <jreck@google.com> Make getFrameNumber lazy

Change-Id: I783de544ad9a3636ea90f1c8c4034738997bfbc8
Fixes: 28246085
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
8afcc76920499d0a384dba1470c5a377f80ed768 13-Apr-2016 John Reck <jreck@google.com> Revert "Revert "Make stopped state a first-class thing""

This reverts commit eab3f2658aa41d37c3b05d49a2ce4e3f4ed85399.

Fixes first-frame issue, mReportNextDraw needs to override
mStopped

Fixes: 28118961
Fixes: 27286867

Change-Id: I5c811759637d08ba9f3b342016d1b3006986d5a2
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
825fa4d5ae7b2907ee1769d09e6333306de2a92e 11-Apr-2016 John Reck <jreck@google.com> Merge "Revert "Make stopped state a first-class thing"" into nyc-dev
eab3f2658aa41d37c3b05d49a2ce4e3f4ed85399 11-Apr-2016 John Reck <jreck@google.com> Revert "Make stopped state a first-class thing"

This reverts commit 945961f78a78eced823d5ba78505c781b079703d.

Change-Id: Iebc1d49fac33380233f8785fc39bec6c30a5e714
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
c724dcf23c5e2ebd22c042a8a6f2424b7e9d5029 08-Apr-2016 John Reck <jreck@google.com> Merge "Make stopped state a first-class thing" into nyc-dev
945961f78a78eced823d5ba78505c781b079703d 08-Apr-2016 John Reck <jreck@google.com> Make stopped state a first-class thing

Bug: 27286867

WindowManager has committed to stopped state
controlling the lifecycle of the Surface, so
make that a first-class thing in HWUI as well.

This makes it more resistent to things like
a rogue updateSurface() happening while mStopped=true,
leading to bad things down the line. Instead let
the surface be changed/updated as often as desired,
and just block any attempt to draw on that surface.

Also removes some unnecessary makeCurrent()s, as
EglManager ensures that we *always* have a valid
GL context now (using a pbuffer surface if there is
no window surface set)

Change-Id: Iead78ddebc7997e8fdb0c9534836352f5e54b9bd
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
51f2d606dcbfba3cc5b03dfea37c1304b91c232f 06-Apr-2016 John Reck <jreck@google.com> Fix some edge cases

Bug: 27709981

This desperately needs a refactor, but to keep
the current (really needed & nice) behavior of
dispatching after sync finishes would be difficult
to handle cleanly without lots of ripping so... #yolo

Change-Id: I831a06c6ae7412a062720d68ecbe3085190f0258
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
6246d27813f25b85f6e4b5cb1121fe8484bcce2d 30-Mar-2016 Chris Craik <ccraik@google.com> Support buildLayer in new pipeline

bug:26561995
bug:27620686

Change-Id: I6c39f9a077e7e6002d3c01b8888238fd17b0f02a
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
38f6c034d153bb648d45bce09d80a69ba3e03360 17-Mar-2016 John Reck <jreck@google.com> Move updating window position off RT

Bug: 27385141
Change-Id: I6c75b5f1d9ef55ef64dde050f71d0e28fb8714bf
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
11f02d7e522ec8742f7ef533c252e04e24b93f6b 13-Feb-2016 Andres Morales <anmorales@google.com> allow for slow FrameMetricsListeners

A slow listener could cause a race in the NotifyHandler
where the single reference to the buffer to send would get
updated when it shouldn't have been.

Switch to a queue of available buffers to prevent this race.

Also, stop setting and clearing the observer reference and instead
incStrong/decStrong to mark temporary strong ownership without
colliding with other owners in flight.

Bug: 27097094
Change-Id: Iee647bfae8b80019b6d8290179eed3973230901f
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
910beb8f5d9042163e2ad0dbb744d9f147db9604 03-Feb-2016 Andres Morales <anmorales@google.com> updates to FrameStatsObserver API

- Rename to FrameMetrics to avoid collision with existing
android.view.FrameStats class
- Make FrameMetricsObserver implementation detail,
exposing FrameMetricsListener interface as public API
and wrapping in FrameStatsObserver to maintain state
- Remove dropped frame count call, in favor of passing as
parameter to callback method.
- Move away from raw timestamp access in favor of Metric IDs
which represent higher-level, more stable stages in a frame
lifecycle and match the categories exposed in the onscreen
bars.
- Support many-to-many Window<->FrameMetricsListener relationship

Change-Id: I00e741d664d4c868b1b6d0131a23f8316bd8c5c2
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
0a1abd3247d856fe875d5ef45f75bc2c8167ea96 04-Feb-2016 John Reck <jreck@google.com> Merge "Have RT drive window positioning"
f648108f83d4e74811919e9811efb8fcc184b8a3 03-Feb-2016 John Reck <jreck@google.com> Have RT drive window positioning

Bug: 22802885

Change-Id: I6beed5474d3a943b16e9097f7bd61ce3cbd37505
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
6e068c0182f6f85bccb855a647510724d1c65a13 16-Jan-2016 Chris Craik <ccraik@google.com> Early kickoff of shadow tasks

bug:26562703

Change-Id: I7cdf18f2c662380bd31c7ffeefd5c3f569e5c1c6
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
06f5bc70a667a02b14e31d3f53f91d3661e30666 16-Dec-2015 Andres Morales <anmorales@google.com> expose hwui frame stats through FrameStatsObserver

Change-Id: I88884bafc8e2f6d7f67a36d3609490e83cf8afd5
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
031eaedef8047c8054064ab12d05c3edca07a933 17-Dec-2015 Chris Craik <ccraik@google.com> Merge "Add TextureView support to new renderer/reorderer"
d2dfd8f128b632ed99418ab2b32949c939a9a369 16-Dec-2015 Chris Craik <ccraik@google.com> Add TextureView support to new renderer/reorderer

bug:22480459

Change-Id: I2e4c0bc6b904706132f3f5087ededc9cac9b40fb
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
bf4b31f7b23b0bc7a2ed4fc779aac37c9c486eb2 16-Dec-2015 John Reck <jreck@google.com> resolve merge conflicts of 04ce46db64 to master.

Change-Id: I935bb47718f0e7d5fb48945dd8de6e28dac136e5
0bcd0cb6b1193168fa2840855195347488daab9e 04-Dec-2015 Thomas Buhot <thomas.buhot@intel.com> libhwui: make setSurface asynchronous

On the critical path of the cold launch of applications
the main thread of the started application tells the RenderThread
to create a surface. This process is synchronous and blocks
the main thread of the application until the creation
of the EGLContext is complete.
As a consequence the launch time of the application is delayed
by time spent allocating the EGL Context in the RenderThread.

With this optimization the launch time of any application
is improved (for example settings by 20 to 40 ms).

Change-Id: Ibf47aaa0abb8dedf7aa00693073db3785d9d6b08
Signed-off-by: Thomas Buhot <thomas.buhot@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
9e7fcfda28fde747ba4e026772007cea77374e16 25-Nov-2015 Chris Craik <ccraik@google.com> Move BakedOpDispatcher to separate file

Change-Id: If7aad6db6b7e54a33eac9b9eddbe8cd844207282
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
98787e6c9b2c10b1ab7820bdac168686025b924a 13-Nov-2015 Chris Craik <ccraik@google.com> Finish shadow support in new reorderer/renderer

Now passes alphas and light radius, and correctly transforms light
center for layers.

Also fixes begin-frame/layer clears to be damage rect aware.

Change-Id: I3b1415cd7bf1518c510145ebebdb745f494a2542
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
0b7e8245db728d127ada698be63d78b33fc6e4da 29-Oct-2015 Chris Craik <ccraik@google.com> Initial HW layer support in new reorderer/renderer

Shares vast majority of clipped savelayer code, with only minor
differences in lifecycle.

Doesn't yet handle fill region, resize, or window transform.

Change-Id: Iabdd71811590d2b937eb11e1b01ce556ade54a5a
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
263e19bf46a40e3924ab9a7f374ecc420726fc9d 29-Oct-2015 Chris Craik <ccraik@google.com> Merge "Simplify TreeInfo"
e2e53a7079733694bd52dbce665e9ceff21e9727 28-Oct-2015 Chris Craik <ccraik@google.com> Simplify TreeInfo

Change-Id: I8f05e9046236d607016b6c2bb77a333cfb47ba47
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
97c92659fab67ca61d276f551e6f9d315428a6aa 28-Oct-2015 John Reck <jreck@google.com> Merge "Tune scheduling a bit, avoid a binder ipc"
e486d932ca5a10446a3c98d6d065213913277268 28-Oct-2015 John Reck <jreck@google.com> Tune scheduling a bit, avoid a binder ipc

Don't query running behind if it's not possible to be behind such
as having received a vsync since the last call to swap buffers.

This also avoids an accidental-starvation issue where if surface
flinger was a bit sluggish to dequeue then renderthread would drop
thinking the queue was full.

Also be a bit smarter about tracking if we've already drawn for this
vsync target to avoid producing two frames for the same vsync

Change-Id: Ib266500a693c27000b2e8ea578f111229d75147a
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
77c40109cf25d29f85ee6c13aeb96e22e55f33ab 26-Oct-2015 John Reck <jreck@google.com> Cleanups

Change-Id: I10001711afb2530c5dc19aebf2d055ae41f58c6a
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
ddf2215d9807b641dbcb304779ef6b530f876ac7 15-Oct-2015 Chris Craik <ccraik@google.com> Add partial damage support to new draw path

Change-Id: I612578fd181240de71297c9a28bc9a8f350764a7
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
b816087962aba0019b022303330f03b897b580ed 22-Sep-2015 Skuhne <skuhne@google.com> 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
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
ea7a7fb75acb7305eb774ca7bc7e96103bd49323 28-Aug-2015 Skuhne <skuhne@google.com> 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
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
e248bd1b2c3fcf8088429507e73b31f45ee2544b 05-Aug-2015 John Reck <jreck@google.com> Serializing display lists

This is a WIP prototype

Change-Id: Id4bfcf2b7bf905221c3734b7b6887c9b2efd37e6
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
149173d28c0843aba86b0810ce75b34be6a0d08f 10-Aug-2015 John Reck <jreck@google.com> Support new EGL extensions

Bug: 21753739

Includes a revert of 13d1b4ab10fbee5e81a2ba1ac59cfae1e51d3ef0
as that only supported EGL_EXT_buffer_age

Change-Id: Ia86a47d19e3355c067934d7764c330b640c6958d
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
13d1b4ab10fbee5e81a2ba1ac59cfae1e51d3ef0 30-Jul-2015 Season Li <seasonl@nvidia.com> renderthread: add EGL_EXT_buffer_age support

EGL_EXT_buffer_age is better than EGL_BUFFER_PRESERVED
because it can save memory bandwidth used to blit
back buffer into front buffer.

Change-Id: I2fea0ee08dc7dd66e348b04dd694d075d509d01b
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
272a685f17cc4828257e521a6f62b7b17870f75e 30-Jul-2015 John Reck <jreck@google.com> Replace most usages of utils/Vector.h

Change-Id: I540d1b3523244d6c71fc52d6fb30555271c25644
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
be3fba05e823f740f65b2679929347dc3dd282ad 06-Jul-2015 John Reck <jreck@google.com> Adjust for pipeline stalls

Bug: 20853441

Calculating duration that crosses the UI-RT
sync point will now subtract out the time spent waiting
in queue under the assumption that this time will be
accounted for in the previous frame's metrics

Change-Id: Ia8213f4410638840613f5ae439e98dfb77532a6a
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
d7db4d767246b41d44995acb93d03d220b53c748 20-May-2015 John Reck <jreck@google.com> Eliminate requireGlContext

Bug: 20297820

Change-Id: I37c63bab6f6c0d2337c8c6002046d2ef17e74097
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
50210d912925aef14e4ce69be82e4949122a3cd9 15-May-2015 Alan Viverette <alanv@google.com> Adjust light source for window position

Bug: 16523629
Change-Id: I2f3fed1edcac0a3cfd5034aded45e08ececfebaf
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
4c9e59d03c2bca38001225b79d01740b8999adfb 12-May-2015 John Reck <jreck@google.com> Unify DrawProfiler/JankStats

Bug: 20822400

Change-Id: I24345c3120440bfce14e8cbe7e880b39f10b744a
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
d04794a9a3f9edc8b7ca336175d66eb81a8f55fa 08-May-2015 John Reck <jreck@google.com> Add eglSwapBuffersWithDamageKHR support

BUG: 20761426
Disabled temporarily

Change-Id: I0b6b6f0eebab886145e13fa35aefe76826965cf5
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
edc524c90506d80e0fc5fb67e8de7b8f3ef53439 18-Mar-2015 John Reck <jreck@google.com> Add GraphicsStatsService

More S's for More Speed

Split JankTracker's backing data from the
class to allow for data relocation to/from ashmem regions

Pack the jank tracking data to fit in 256 bytes

Change-Id: Ife86a64b71a328fbd0c8075fe6a0404e081f725b
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
b36016c65f1d1b5846dba0349aab491dbd3a746a 11-Mar-2015 John Reck <jreck@google.com> Cleanups & simplifications

Change-Id: I5ad5e3b8fe55b1528f2e20c63e5abe51d9e40ff1
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
ba6adf66d3c44c0aa2fd8a224862ff1901d64300 19-Feb-2015 John Reck <jreck@google.com> Initial attempt at jank-tracking stat collection

Is a bit naive, perhaps overly aggressive, but sorta works

Change-Id: I01a774e00dbe681439c02557d9728ae43c45ce50
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
d41c4d8c732095ae99c955b6b82f7306633004b1 06-Jan-2015 Chris Craik <ccraik@google.com> Add overrides and switch to nullptr keyword for all files

Adds remaining missing overrides and nullptr usages, missed due to
an extreme failure in tool usage.

Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
51d6a3db97bdd5315f1a17a4b447d10a92217b98 23-Dec-2014 Chris Craik <ccraik@google.com> Cleanup various clang warnings, use unique_ptrs in several places

Change-Id: I347904b25e51fcc7de14b1e72f1acd0f6ba26f3f
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
01a5ea35fbba4c5bb1d7790ae1677a2fa752e042 03-Dec-2014 John Reck <jreck@google.com> Resume RT-animations after a pauseSurface

Bug: 18203577

The issue occurs as a result of performTraversals() both doing
a window relayout call *and* early-returning because it's not dirty.

To fix this pauseSurface() returns whether or not the RT-side is
"dirty" to force ViewRootImpl to do a draw even if mDirty is
otherwise empty.

Change-Id: I534f367e75d18d273ebf14df3927f5c464ef6bef
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
aa95a88327d9a3ac8a4a00b065b78ac0f28b3a19 07-Nov-2014 John Reck <jreck@google.com> Have an actual fallback if the surface is lost

Bug: 17516789

This will force a relayout/reinitialize pass if the Surface
is lost mid-render instead of crashing on the next frame

Change-Id: If08bfa16f740728fa7c05904fa11e26f07b81e2e
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
1125d1fa92ab9f3b8315bbfb72e038b62dfd454b 23-Oct-2014 John Reck <jreck@google.com> Add some free zoom to lockHardwareCanvas

Bug: 18099195

Don't use EGL_SWAP_BUFFER_PRESERVED on surfaces that will
never benefit. Also clean up some confusing naming

Change-Id: I674ca64e0464a3282cff79e5ecd350d08f47c014
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
749906b468912dab7bf69a86e852deac3e80b0cc 04-Oct-2014 John Reck <jreck@google.com> Cleanup DeferredLayerUpdater

Bug: 17765082

DeferredLayerUpdater had fallen behind RT updates. Re-snap to
latest expectations, ensuring to call requireGlContext() prior
to detachSurfaceTexture to avoid leaking SurfaceTextures

Change-Id: Ic65fb9831e5284f658866da8da9ad5af1d227699
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
443a714fa7c0dd07fee3527cc5bc3d3ca1fb7d44 05-Sep-2014 John Reck <jreck@google.com> Yet more layer tracking logging

Bug: 17208461

Change-Id: I55e7d0921eb565867e966d68b798b7b92c391b55
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
17035b0211a3c9d45ea46a99217a6acbe76e8fbe 03-Sep-2014 John Reck <jreck@google.com> Have destroy call freePrefetchedLayers

Bug: 17208461

There's a potential race condition between HardwareRenderer.destroy()
being called (which calls destroyCanvasAndSurface()) and the renderer
being finalized (which is what calls freePrefetchedLayers), during which
time it's possible we get a TRIM_MEMORY_COMPLETE and destroy the EGL
context.

Fix this race condition by moving stopDrawing() and freePrefetchedLayers()
into destroyCanvasAndSurface() where they should have been in the first
place.

Also, if we hit the assertion failure, dump the current state of
Caches to try and provide more context for the failure.

Change-Id: Ife0ba3562041e8b08e87e3e13640472b3004eed6
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
998a6d81896df8b662cc10ddeb35087b78b38d72 29-Aug-2014 John Reck <jreck@google.com> Track buildLayer calls, destroy if unused

Bug: 17208461

Change-Id: Ibdb104a493285d77a6891c5e74e38a52c7014da9
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
119907cd2575c56b1ebf66348b52e67aaf6a88d8 14-Aug-2014 John Reck <jreck@google.com> Animator stuff

Bug: 17228458

Change-Id: Id884a429a512f9cd2be0ed16dbd0f10e92b4440d
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
3e8249568cc428296ac76c7ddce3f0382d40fe5b 20-Aug-2014 John Reck <jreck@google.com> Implement full View.buildLayer

Bug: 17152292

Change-Id: Ia3cc2aadf72fe14517f50762fc634794df51ad5a
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
058fc640017c90120c599d378a4cbc55668b05b7 24-Jul-2014 Chris Craik <ccraik@google.com> Connect shadow style attributes to renderer

bug:15859361

Moves lighting info out of StatefulBaseRenderer, since it's not useful
at record time, and only used by OGLR.

Change-Id: I7ab065d02d9304afad1dc4c48597a7a621366f8e
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
f47a594f5250b1914c36423ee6b371f0b8db09d0 01-Jul-2014 John Reck <jreck@google.com> Fix onTrimMemory for HardwareRenderer

Also fixes detachFunctor possibly drawing after return

Bug: 15189843
Bug: 15990672

Change-Id: I64c48cb674c461a8eeaba407b697e09f72c98ce3
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
68bfe0a37a0dcef52abd81688d8520c5d16e1a85 25-Jun-2014 John Reck <jreck@google.com> Animator refactoring & fixes

Tweaks animators to have less unnecessary refcounting

Pull animator management out into seperate class

More control to tweak animator lifecycle, such as doing
Java-side handling of start delay by attaching but not
starting the animator

Change-Id: I4ff8207580ca11fb38f45ef0007b406e0097281c
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
3b20251a355c88193c439f928a84ae69483fb488 23-Jun-2014 John Reck <jreck@google.com> No-fail invokeFunctor

Bug: 15513308
Bug: 15449247

Change-Id: I13a29f9c8d4975cdda6dcb33b6332c2555ff0f7c
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
e4267ea4f20740c37c01bfb6aefcf61fddc4566a 04-Jun-2014 John Reck <jreck@google.com> Even FASTER damage calculations!

* Now with more native!
* Less matrix math thanks to bulk-property-update support!
* Zero JNI on the View.damageInParent() path!
* Fully aware of RT-driven animators!
* Likely full of new and exciting bugs!
* But it also fixes at least 1 existing invalidate bug!

Change-Id: Ie0773f85a60850ff2668370c58defef2e8aa079f
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
d72e0a339b54af0c4e731513bbad120dff694723 30-May-2014 John Reck <jreck@google.com> Re-jigger layers

Bug: 15185239
Bug: 15238382

Make DeferredLayerUpdater ref counted so that
HardwareLayer:finalizer() works non-crashily on
leaked layers
Give DeferredLayerUpdater the ability to have a layer destroyer
set so that leaked layers can still be recycled on the
RenderThread
Order layer updates based off of pushLayerUpdate() calls to fix
issue with nested layers

Change-Id: I4449cee607f7e5126e02fed7464cf48038e3dfdf
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
fe5e7b7346a54537b980796ceeca66bfdbd05561 24-May-2014 John Reck <jreck@google.com> Enable debug stuffs

Bug: 14596762
* dumpsys gfxinfo implemented
* profile GPU visual_bars implemented

Change-Id: Icb948a9d5af5989b5615504d0d76ade64b93ef5b
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
e1628b7c6fc3822fa83cf02028ce8ad67abb0afe 24-May-2014 John Reck <jreck@google.com> Implement FlushCaches TODO

Change-Id: Id05429e98ffe0858275b32c41fb215c1d8d930b2
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
a5dda645da738da7b4ae15e28fa7d93d3b04b94f 23-May-2014 John Reck <jreck@google.com> Bag of scheduling tweaks

Bug: 15118640

* Prevent over-stuffing the queue by dropping frames
* Prevent double-drawing in one pulse by RT by deferring
vsync registration until post-draw so that it catches
the next vsync pulse instead of the current one
* Bias vsync race condition towards the UI thread
* Fix queueDelay to actually work

Change-Id: Ibf584258bd93ebcbba058bd976dc8b307f1c6155
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
797b95b26bbb7557678af78b9a2a61830158920f 21-May-2014 Chris Craik <ccraik@google.com> Define light position (using new lighting spec) in Java

Also updates the relative shadow strengths.

Change-Id: I6cac7275d38df98aea9f0dda463cd7207102986a
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
66f0be65a1046f54ddce0498b242c1fa0776b1ea 13-May-2014 John Reck <jreck@google.com> Wire up texture atlas

Bug: 14590563

Change-Id: I2dffbc089dc801f5fb2d1c8fd38e1c71d160e110
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
63a06673253914510bbeebd500655008682dade1 07-May-2014 John Reck <jreck@google.com> Implement TODO(romainguy)

Bug: 14277445

Change-Id: Id52d6f7fcc023000adcc440bd4da67d9a673536b
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
f9be77940e365036fecd8cc0e491e8545c34e79b 03-May-2014 John Reck <jreck@google.com> Make RenderNodeAnimator and WebView play nice

Change-Id: Ifaefcf510b2d377663fc86f60608d6ec9be8329a
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
18f16e6fba74eda173e1e7c869e6e2e2acc073ff 03-May-2014 John Reck <jreck@google.com> TIME LORD!

Bug: 14444180

Change-Id: I68bec3807c4d1c88d5af1aec2fe6907d60b5f2f3
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
e45b1fd03b524d2b57cc6c222d89076a31a08bea 15-Apr-2014 John Reck <jreck@google.com> RenderThread animator support

Change-Id: Icf29098edfdaf7ed550bbe9d49e9eaefb4167084
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
e8a866d4a41daa43e394505e12503b32c2d929e4 14-Apr-2014 John Reck <jreck@google.com> Merge "Fix issue with bitmap uploading"
860d155f866cc15a725e7ce03763280987f24901 12-Apr-2014 John Reck <jreck@google.com> Fix issue with bitmap uploading

Bug: 13912749

Change-Id: Ic23fa1d280118dc93dc2716a4a24cc0bbbdca595
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
fae904d63947fe1687d1d44be29234cc3d538f24 14-Apr-2014 John Reck <jreck@google.com> Fence on destruction

Bug: 14052927
destroyCanvasAndSurface() needs a fence as when it returns the
underlying BufferQueue is going to be released from under
the render thread.

Change-Id: I0147a1d5ec5adf0239c761ef22f65cd8c8a137df
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
d3d8dafc2f61fb118c060720b52684c59303f3db 11-Apr-2014 John Reck <jreck@google.com> Make attachFunctor blocking

Bug: 13930200

Change-Id: I9b0cf92fd16bb30baa09b6f8d7ae22a8b2a7fd80
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
f4198b713e43c0c0f9adac74203cf24c2a49b802 10-Apr-2014 John Reck <jreck@google.com> Merge hasFunctors & pushStaging into prepareTree

Bug: 13902607
Fixes synchronous mode for WebView in HardwareLayers

Change-Id: I90de1e26dcfd9b75cc2f03bac72705fc23237b68
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
8e1f918738abf70a4dc86dbb12b386a9deea37f8 10-Apr-2014 John Reck <jreck@google.com> Merge "Switch DisplayListData to a staging model"
8de65a8e05285df52a1e6f0c1d5616dd233298a7 10-Apr-2014 John Reck <jreck@google.com> Switch DisplayListData to a staging model

Bug: 13912977

Change-Id: I5b2f664e797be22a58300964f57ceb4fab60528c
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
f7d9c1dc84671d4e99657ef071d275700d85bb11 09-Apr-2014 John Reck <jreck@google.com> Fix ThreadedRenderer.setEnabled()

Bug: 13914116
Fixes lifecycle issues around setEnabled where ThreadedRenderer
was reporting as being enabled before it had a Surface. This is
incorrect.

Also fix some EGL lifecycle issues

Change-Id: I12ebb279707f9b533a570b61d68735d858b560bf
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
1949e7928eeec22cd3f74b5f763a4eb433238453 09-Apr-2014 John Reck <jreck@google.com> Ensure there's a GL context before creating a Layer

Bug: 13745587

Change-Id: Ib0ec059d9a5974a48734daeec9d83580cada94a3
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
0d1f634f4b5e1bb37aa51777efb6a68619488d01 29-Mar-2014 John Reck <jreck@google.com> Add invokeFunctor

Change-Id: I09e675d3e02e3e528642175ada00b2b17fab7652
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
750ca6dbdb259aea0ca5b77380a9303e586ef3ea 29-Mar-2014 John Reck <jreck@google.com> Remove kStatusInvoke & kStatusDraw

They are unused

Change-Id: I44ecf1164dc6bc1b09438e733976d5a97a25f00e
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
e18264b079481a244b30e3f71012c53bbd861f92 12-Mar-2014 John Reck <jreck@google.com> Rename DisplayList->RenderNode

Change-Id: Id42e23c9a1a6eb6eaeafef707ced7fa6887b03d0
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
be34f2f3b340196426bdf558b28951359a4d84fa 10-Mar-2014 John Reck <jreck@google.com> DisplayList lifecycle changes

Bug: 13360343
Change DisplayList to be more forgiving with weaker lifecycle
requirements. Is more self-managed with a strong reference
to the renderer it needs

Also fix naming mismatch

Change-Id: I5c89453a72a52954f6f959f0846199705dbb6476
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
44fd8d24f761f82d21e9b00932648a1b6bf91449 26-Feb-2014 John Reck <jreck@google.com> DisplayList overhaul

Change-Id: I53418d580c98f706e971545cff81b9921c12cc5f
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
19b6bcfd83eb7fb92ebd06d2fec89e308311f1d0 15-Feb-2014 John Reck <jreck@google.com> Support HardwareLayers in RenderThread

Also has a few HardwareLayer lifecycle fixes

Change-Id: I6308cb05f8f199eed72189ace768013a46815941
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
fc53ef27793a39e9effd829e9cae02a9ca14147e 11-Feb-2014 John Reck <jreck@google.com> Implement missing safelyRun() on ThreadedRenderer

Change-Id: I14b75f37a13fabaa759a51369190dbdc84087c4b
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
4f02bf4eef6af47f35c70c4dda5b7b9523d89ca0 04-Jan-2014 John Reck <jreck@google.com> Native-side proxy

Remove RemoteGLRenderer
Remove reflection-based control

Change-Id: If17c2bbb61c7141986d88c4763def77ed1074985
/frameworks/base/libs/hwui/renderthread/CanvasContext.h
23b797ab5151eb2474f3bdd679f2f07bfd723042 04-Jan-2014 John Reck <jreck@google.com> EGL migration to native

Move EGL state management to native side for RemoteGLRenderer

Change-Id: I12b0fed70246564d4caebf87374e8bbca655c572
/frameworks/base/libs/hwui/renderthread/CanvasContext.h