| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I73127fc7369643b94d4a49f31a516b50c74b54ac
|
|
|
|
| |
Change-Id: Ic345422567c020c0a9035ff51dcf2ae2a1fc59f4
|
|
|
|
| |
Change-Id: Ia1523d02dc2b7f58ca26a142a5aef710792a5f3d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the Android runtime starts, the system preloads a series of assets
in the Zygote process. These assets are shared across all processes.
Unfortunately, each one of these assets is later uploaded in its own
OpenGL texture, once per process. This wastes memory and generates
unnecessary OpenGL state changes.
This CL introduces an asset server that provides an atlas to all processes.
Note: bitmaps used by skia shaders are *not* sampled from the atlas.
It's an uncommon use case and would require extra texture transforms
in the GL shaders.
WHAT IS THE ASSETS ATLAS
The "assets atlas" is a single, shareable graphic buffer that contains
all the system's preloaded bitmap drawables (this includes 9-patches.)
The atlas is made of two distinct objects: the graphic buffer that
contains the actual pixels and the map which indicates where each
preloaded bitmap can be found in the atlas (essentially a pair of
x and y coordinates.)
HOW IS THE ASSETS ATLAS GENERATED
Because we need to support a wide variety of devices and because it
is easy to change the list of preloaded drawables, the atlas is
generated at runtime, during the startup phase of the system process.
There are several steps that lead to the atlas generation:
1. If the device is booting for the first time, or if the device was
updated, we need to find the best atlas configuration. To do so,
the atlas service tries a number of width, height and algorithm
variations that allows us to pack as many assets as possible while
using as little memory as possible. Once a best configuration is found,
it gets written to disk in /data/system/framework_atlas
2. Given a best configuration (algorithm variant, dimensions and
number of bitmaps that can be packed in the atlas), the atlas service
packs all the preloaded bitmaps into a single graphic buffer object.
3. The packing is done using Skia in a temporary native bitmap. The
Skia bitmap is then copied into the graphic buffer using OpenGL ES
to benefit from texture swizzling.
HOW PROCESSES USE THE ATLAS
Whenever a process' hardware renderer initializes its EGL context,
it queries the atlas service for the graphic buffer and the map.
It is important to remember that both the context and the map will
be valid for the lifetime of the hardware renderer (if the system
process goes down, all apps get killed as well.)
Every time the hardware renderer needs to render a bitmap, it first
checks whether the bitmap can be found in the assets atlas. When
the bitmap is part of the atlas, texture coordinates are remapped
appropriately before rendering.
Change-Id: I8eaecf53e7f6a33d90da3d0047c5ceec89ea3af0
|
|
|
|
| |
Change-Id: If54b7d7c016acb5e7300323d2eada57142a814c0
|
|\
| |
| |
| | |
Change-Id: Id002d2ae799c6946672335f122ecbfa07d9c0bc1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
PBOs (Pixel Buffer Objects) can be used on OpenGL ES 3.0 to perform
asynchronous texture uploads to free up the CPU. This change does not
enable the use of PBOs unless a specific property is set (Adreno drivers
have issues with PBOs at the moment, Mali drivers work just fine.)
This change also cleans up Font/FontRenderer a little bit and improves
performance of drop shadows generations by using memcpy() instead of
a manual byte-by-byte copy.
On GL ES 2.0 devices, or when PBOs are disabled, a PixelBuffer instance
behaves like a simple byte array. The extra APIs introduced for PBOs
(map/unmap and bind/unbind) are pretty much no-ops for CPU pixel
buffers and won't introduce any significant overhead.
This change also fixes a bug with text drop shadows: if the drop
shadow is larger than the max texture size, the renderer would leave
the GL context in a bad state and generate 0x501 errors. This change
simply skips drop shadows if they are too large.
Change-Id: I2700aadb0c6093431dc5dee3d587d689190c4e23
|
|\ \
| |/
| |
| | |
Change-Id: I64e1cbfb0eee891ce4d1eee40eefdcedcc501f7f
|
| |
| |
| |
| |
| | |
Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
|
|/
|
|
|
|
|
|
|
|
| |
SystemServer is currently a monolithic class that brings up key system
services. This change is the first phase of refactoring it to be more
configurable. Specifically, it adds a set of on/off switches used to control
startup of individual services. Future plans include finer grained controls
and a more explicit and consistent startup sequence for these services.
Change-Id: I7299f5ce7d7b74a34eb56dffb788366fbc058532
|
|
|
|
|
|
|
|
|
| |
This change will greatly simplify the multi-threading of all
shape types.
This change also uses PathTessellator to render convex paths.
Change-Id: I4e65bc95c9d24ecae2183b72204de5c2dfb6ada4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This API can be used to run arbitrary tasks on a pool of worker
threads. The number of threads is calculated based on the number
of CPU cores available.
The API is made of 3 classes:
TaskManager
Creates and manages the worker threads.
Task
Describes the work to be done and the type of the output.
A task contains a future used to wait for the worker thread
to be done computing the result of the task.
TaskProcessor
The processor dispatches tasks to the TaskManager and is
responsible for performing the computation required by
each task. A processor will only be asked to process tasks
sent to the manager through the processor.
A typical use case:
class MyTask: Task<MyType>
class MyProcessor: TaskProcessor<MyType>
TaskManager m = new TaskManager();
MyProcessor p = new MyProcessor(m);
MyTask t = new MyTask();
p.add(t);
// Waits until the result is available
MyType result = t->getResult();
Change-Id: I1fe845ba4c49bb0e1b0627ab147f9a861c8e0749
|
|
|
|
| |
Change-Id: I2cebbfbcb722ed4b37e54ffbf8b53bb92ad0c964
|
|\
| |
| |
| |
| | |
* commit 'ad82f20d2382396f5ac75fdf6f7db5c4da1c4c23':
DisplayList draw operation reordering
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
bug:8037003
The reordering enables similar operations to draw together, minimizing the
OpenGL state change operations that go inbetween draws. Eventually, multiple
complete canvas draw operations will be merged (into a single glDrawArrays call,
for example)
Reorders DisplayList draw operations when:
-They can move backwards in the command stream to be after similar
operations without violating draw ordering
-The OpenGLRenderer is in a simple, replayable state (no complex clip,
or filter/shadow etc)
Also adds two system properties to control the deferral/reordering:
"debug.hwui.disable_draw_defer"
"debug.hwui.disable_draw_reorder"
which can be set to "true" to control the display list manipulation
Change-Id: I5e89f3cb0ea2d2afd3e15c64d7f32b8406777a32
|
|\ \
| |/
| |
| |
| |
| | |
Only include file changes in conflict.
Change-Id: I1b6eb3343e7163827d8031ffea4b77f294980ccc
|
| |
| |
| |
| | |
Change-Id: Ic9c1bbf4673ad5c756f3908b2ab7e699edd6a119
|
|\ \
| |/
| |
| |
| |
| | |
# Via Android (Google) Code Review (1) and Chris Craik (1)
* commit '805a6fe7b1417640ccaf7914171cb65515b6ab39':
Revert "Revert "Use RenderScript for large text blurs""
|
| |
| |
| |
| |
| |
| | |
This reverts commit bf5703e52e3304246cbf0e73f6976f7d7312d238.
Change-Id: Ic6f991277dec9e80a6fed93db91499726b30ab2a
|
| |\
|/ /
| |
| | |
'goog/master'" DO NOT MERGE"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
'goog/master'" DO NOT MERGE
This reverts commit 6c0307dd0aefe9a08794b155fc03ee60ebd14f25, reversing
changes made to a2cd828b749c444d55c2c41c7dbb85088ff94b9f.
Conflicts:
packages/SystemUI/res/values-sv/strings.xml
Change-Id: Ia178efe8b14751583d47b2826bfe3d3d5463dd2e
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 3f76e65d251ead65fe8ff98e3bd4c7623fbaac07
Change-Id: Ia81cd485e5ca696bb284c419dc8a1d2f3247100e
|
|\ \ \
| |/ / |
|
| |/
| |
| |
| |
| |
| | |
Still fall back to simple path for small tasks
Change-Id: I492f1b3f7d6fec1738f3e45cbfb15864bd23a392
|
|/
|
|
|
|
|
|
|
|
| |
Bug #7146141
This new cache is used in a similar way to LayerCache. It helps
reuse already allocated stencil buffers and thus avoid churning
memory on every frame.
Change-Id: I19551d72da52c40039e65904563600e492c8b193
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug #7146141
This change is needed to add a render buffer cache to avoid
creating and destroying stencil buffers on every frame.
This change also allows the renderer to use a 1 bit or 4 bit
stencil buffer whenever possible.
Finally this change fixes a bug introduced by a previous CL
which causes the stencil buffer to not be updated in certain
conditions. The fix relies on a new optional parameter in
drawColorRects() that can be used to avoid performing a
quickReject on rectangles generated by the clip region.
Change-Id: I2f55a8e807009887b276a83cde9f53fd5c01199f
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
bug:7117155
bug:8114304
Currently used for lines (with and without AA) and arcs with useCenter=false
Also removes 0.375, 0.375 offset for AA lines
Change-Id: Ic8ace418739344db1e2814edf65253fe7448b0b0
|
|/
|
|
|
| |
bug: 6906025
Change-Id: Iefdb830ec3aa2ab3472c1c142484a7aa21788a15
|
|
|
|
|
|
| |
bug:4419017
Change-Id: If0428e1732139786cba15f54b285d880e4a56b89
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, to draw a layered view with a changed Paint object for the
drawLayer operation, you'd have to invalidate the parent view, to get the
native DisplayList to pick up the new Paint properties. This change adds
API and functionality so that the developer can call setLayerPaint(), which
does the proper invalidation (lightweight, doesn't cause redrawing the view).
Issue #6923810 Make it easy to efficiently animate a layer's Paint
Change-Id: I7fea79788d50f6d9c86dd5e5b2a4490cb95142bb
|
|
|
|
|
|
|
|
| |
FontRenderer.h defined several classes and structures that now live
in the font/ folder. This will make the code easier to read and
maintain.
Change-Id: I3dc044e9bde1d6515f8704f5c72462877d279fe2
|
|
|
|
|
|
| |
This reverts commit a8557d2169e14997637f57bc897640c8882d4a46.
Change-Id: I36d4883d548fc47ba6c0b4a42012107d0d2f85a6
|
|
|
|
|
|
|
|
|
| |
this introduced a dead lock in GradientCache's ctor.
This reverts commit dfe082f63e94cde9aee271c94d13de5e7217e036.
Bug: 7096001
Change-Id: I57b8bbab11fb7cb502fa58e3bbf5d19864db874f
|
|
|
|
| |
Change-Id: I41791b1e1bffef77d503dc9e52428395d2309688
|
|
|
|
| |
Change-Id: Ic1208855bde3a254eca2fd7cef43e0f1318ce419
|
|
|
|
|
|
| |
Bug #6833979
Change-Id: I0ea78b7f31a557a335de10d910d03b0520029080
|
|
|
|
| |
Change-Id: Ibcb6e1c883551273c3392cdaa40cd0b71a3bfa70
|
|
|
|
|
|
|
|
| |
The Snapshot class is getting complicated enough that its implementation
should now live in a separate .cpp file. This will become particularly
useful when support for clip regions and paths will be added later on.
Change-Id: I050fac5683a9f7a0ff2f7a6beec3dd28aa5eb0d8
|
|
|
|
|
|
| |
Bug #5581817
Change-Id: Ie30700a29059d2ea60eb7bd3f8bd20ac48a149ab
|
|
|
|
| |
This reverts commit da96f8ac2c1c35a54f3f36e6d776cb386a251d03.
|
|
|
|
|
|
| |
Bug #5581817
Change-Id: If612846ec5f7793710fc4df152791fb32c506551
|
|
|
|
|
|
|
|
| |
This change removes unnessary symbols. All symbols are hidden by
default, public APIs with exported symbols are explicitly marked
with ANDROID_API.
Change-Id: I692fde432a86c12108de1cfd1f6504919a7d5f3f
|
|
|
|
| |
Change-Id: I9fa4cda6ccf92df9d1c644ccdc0e7274a30106e0
|
|
|
|
|
| |
Change-Id: I54dd62ebef47e7690afa5a858f3cad941b135481
Signed-off-by: Iliyan Malchev <malchev@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug #3461349
This change also fixes two bugs that prevented partial invalidates
from working with other views. Both bugs were in our EGL implementation:
they were preventing the caller from comparing the current context/surface
with another context/surface. This was causing HardwareRenderer to always
redraw the entire screen.
Change-Id: I33e096b304d4a0b7e6c8f92930f71d2ece9bebf5
|
|
|
|
| |
Change-Id: I6cedf2b495d58de7c0437096809fa9e4518a1b8c
|
|
|
|
|
|
|
|
| |
With this new backend, a hardware layer is only recreated when
its associated view is udpated. This offers fast composition
in GL and fast update of the layer in GL as well.
Change-Id: I97c43a612f5955c6bf1c192c8ca4af10fdf1d076
|