| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I4577546a5d2e5f084cc03f39a89db9231b8111ee
|
|
|
|
|
|
|
| |
Enables Glop rendering for supported Rects and VertexBuffers
Also removes unused Query object
Change-Id: Ibe227bc362685a153159f75077664f0947764e06
|
|
|
|
| |
Change-Id: I2549032790bddbc048b0bccc224ed8f386b4517c
|
|
|
|
|
|
|
|
| |
Reverted as hwui doesn't agree.
This reverts commit 8a902d9f24e83c87b054adb5836b4a5b8a257be9.
Change-Id: I109e7b02bee2921e2155ded6df36f52e6f574b5a
|
|\
| |
| |
| | |
Change-Id: I3a98f55832ac447b1ed0dd129c7a93d088025943
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove Clang cutout for unused parameters. Fix warnings.
Remove Clang cutout for deprecated Skia function usage. Has been
fixed in the L push.
Change-Id: I7ea073ff67127cc1e14e798b655e2c50615fe8e7
|
|/
|
|
|
|
| |
Bug: 18138852
Bug: 18065434
Change-Id: Ibb07b73b147c2a8b287fe8aee3f6624582f21b00
|
|
|
|
|
|
|
|
|
|
| |
bug:16852257
Updates default shadow opacities to compensate.
Also, update variable/constant naming related to vertex alpha.
Change-Id: I9055b4ac3c9ac305ca9d515f21b52d6aa6dc9c5c
|
|
|
|
|
|
|
|
|
|
| |
bug:16852257
Use pow(alpha, 1.5) to avoid harsh edges on shadow alpha ramps.
Also adjusts shadow constants to compensate.
Change-Id: I5869956d7d292db2a8e496bc320084b6d64c3fb7
|
|
|
|
| |
Change-Id: Iee9cf4f719f6f1917507b69189ad114fa365917b
|
|
|
|
|
| |
bug: 10650594
Change-Id: I4fcf66d008765afa0e35d011f58bc792183cb74f
|
|
|
|
|
|
|
|
| |
Because the caching of projection matrix didn't account for changes in
the offset flag, the flag could be ignored. Now we use both to verify
that the cached matrix can be used.
Change-Id: I193b94eaf0b98f046a6484f0866c3d25048653fd
|
|
|
|
| |
Change-Id: Iddb872f53075dd022eeef45265594d1c6a9e2bc0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bug:4351353
bug:8185479
Point tessellation is similar to line special case, except that we
only tessellate one point (as a circle or rect) and duplicate it
across other instances.
Additionally:
Fixes square caps for AA=false lines
Cleanup in CanvasCompare, disabling interpolation on zoomed-in
comparison view
Change-Id: I0756fcc4b20f77878fed0d8057297c80e82ed9dc
|
|
|
|
|
|
|
|
|
| |
The counter can be enabled by setting the system property called
debug.hwui.overdraw to the string "count". If the string is set
to "show", overdraw will be highlighted on screen instead of
printing out a simple counter.
Change-Id: I9a9c970d54bffab43138bbb7682f6c04bc2c40bd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Add a key manipulation that makes black text/paths use the standard
simple bitmap/patch shader, since they are the same. Previously we'd
create a separate shader for each because the keys differed, even
though the shaders were functionally equivalent.
Also fixes some issues around setting DEBUG_PROGRAM
Change-Id: I0c77c684d58da03501ee9ab8239c7d4a70fd6b5c
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds a new property called "debug.hwui.show_stencil_clip"
that accepts the following values:
- "highlight", colorizes in green any drawing command that's tested
against a non-rectangular clip region
- "region", shows the non-rectangular clip region in blue every time
it is used
- "hide", default value, nothing is shown
Change-Id: I83c8602310edc4aaeb8b905371cdd185b17d32b5
|
|
|
|
| |
Change-Id: I3d901f6267c2918771ac30ff55c8d80c3ab5b725
|
|
|
|
|
|
|
|
|
|
|
| |
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 #7239634
This change passes two matrices to the vertex shader instead of one.
We used to compute the final MVP matrix on the CPU to minimize the
number of operations in the vertex shaders. Shader compilers are
however smart enough to perform this optimization for us. Since we
need the MV matrix to properly compute gradients dithering, this
change splits the MVP matrix into two. This has the advantage of
removing one matrix multiplication per drawing operation on the
CPU.
The SGX 540 shader compiler produces the same number of instructions
in both cases. There is no penalty hit with having two matrices
instead of one. We also send so few vertices per frame that it
does not matter very much.
Change-Id: I17d47ac4772615418e0e1885b97493d31435a936
|
|
|
|
|
|
| |
bug:4419017
Change-Id: If0428e1732139786cba15f54b285d880e4a56b89
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modulation is normally enabled in a shader when drawing with an alpha
mask (A8 texture.) Modulation is used to do one of two things:
- Colorize the primitive (to draw text in red for instance)
- Apply extra translucency (50% translucent circle filled with a bitmap)
The current implementation has four issues:
1. Unnecessary work is performed by assigning the modulation color
to vec4 fragColor early in the shader
2. The modulation color's alpha is applied twice when the primitive
is drawn with an SkShader
3. The decision to modulate is wrong and triggers when any of the
RGB channels is < 1.0. Only the alpha channel needs to be taken
into account to make the decision
4. Gamma correction is not applied properly
This change addresses all four issues above.
Change-Id: I73fcc74efc4b094bf2d1b835f10ffaa2ea4b9eb9
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of calculating opacity from relative position in the shader, use a
shader varying to do this computation for us.
bug:5045101
Also adds a test to HwAccelerationTest to show incorrect antialiasing in
scaled drawAARect / boundarySize calculation.
Change-Id: Icdc41acb01dc10ce354834f8389a5aed2f439162
|
|
|
|
|
|
| |
Avoid using textures for common gradients (two stops from 0.0 to 1.0)
Change-Id: Iff55d21b126c8cfc4cfb701669f2339c8f6b131a
|
|
|
|
|
|
|
|
| |
To enable it, the system property ro.hwui.text_gamma_shader must be
set to true. For testing, DEBUG_FONT_RENDERER_FORCE_SHADER_GAMMA
can be set to 1 in libhwui/Debug.h.
Change-Id: If345c6b71b67ecf1ef2e8847b71f30f3ef251a27
|
|
|
|
| |
Change-Id: I2d43c009c62a7f4a4a2e0a6303bdfa692c4b8c8c
|
|
|
|
|
|
|
| |
See https://android-git.corp.google.com/g/156016
Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
|
|
|
|
| |
Change-Id: I94046bdfe20740c26c8183822e3002d692fde7c4
|
|
|
|
| |
Change-Id: Iae59bc8dfd6427d0967472462cc1994987092827
|
|
|
|
|
|
|
| |
I don't know who's to blame, SGX or Tegra2 but one of those two GPUs is not
following the OpenGL ES 2.0 spec.
Change-Id: I2624e0efbc9c57d571c55c8b440a5e43f08a54f2
|
|
|
|
| |
Change-Id: I29a39775732c0a48d3e6823f7afa3e741cae8541
|
|
|
|
|
|
|
|
|
|
|
| |
All accelerated lines are now rendered as quads. Hairlines used to
be rendered as GL_LINES, but these lines don't render the same as our
non-accelerated lines, so we're using quads for everything. Also, fixed
a bug in the way that we were offsetting quads (and not offseting points)
to ensure that our lines/points actuall start on the same pixels as
Skia's.
Change-Id: I51b923cc08a9858444c430ba07bc8aa0c83cbe6a
|
|
|
|
| |
Change-Id: Ib31fd8445f7ce5f7aa7e0205de0e7db80d024fc2
|
|
|
|
|
|
|
|
|
| |
This optimization is currently disabled until Launcher is
modified to take advantage of it. The optimization can be
enabled by turning on RENDER_LAYERS_AS_REGIONS in the
OpenGLRenderer.h file.
Change-Id: I2fdf59d0f4dc690a3d7f712173ab8db3848b27b1
|
|
|
|
| |
Change-Id: I9a5e01bced63d8da0c61330a543a2b805388a59d
|
|
|
|
|
|
|
|
|
|
|
| |
The generator supports features that are not yet implement in the
renderer: color matrix, lighting, porterduff color blending and
composite shaders.
This change also adds support for repeated/mirrored non-power of 2
bitmap shaders.
Change-Id: I903a11a070c0eb9cc8850a60ef305751e5b47234
|
|
|
|
|
|
|
|
|
|
| |
With this change, all the vertex and fragment shaders used by the GL
renderer are now generated based on a program description supplied
by the caller. This allows the renderer to generate a large number
of shaders without having to write all the possible combinations by
hand. The generated shaders are stored in a program cache.
Change-Id: If54d286e77ae021c724d42090da476df12a18ebb
|
|
|
|
| |
Change-Id: Ibe5a9fa844d531b31b55e43de403a98d49f659b9
|
|
|
|
| |
Change-Id: Id15329da065045b3f06fdaed615f33cd57608496
|
|
|
|
|
|
|
|
| |
This change adds a new DrawLinearGradientProgram class to enable the drawing
of linear gradients. Two new vertex and fragment shaders are introduced,
based on DrawTextureProgram's shaders.
Change-Id: I885afc076bb6cef8cd3962ae21a086fa6a03bf96
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for the following drawing functions:
- drawBitmap(int[]...)
- drawPaint()
Optimizes shader state changes by enabling/disabling attribute arrays
only when needed.
Adds quick rejects when drawing trivial shapes to avoid unnecessary
OpenGL operations.
Change-Id: Ic2c6c2ed1523d08a63a8c95601a1ec40b6c7fbc9
|
|
|
|
|
|
|
| |
This change also cleans up the internal API a little bit by using mat4
everywhere instead of float[16] (for the ortho matrix for instance.)
Change-Id: I35924c7dc17bad17f30307118d5ed437c2ed37e0
|
|
|
|
| |
Change-Id: I02847a60a8734bf8b3d29ec12e76297795095e38
|
|
This change also refactors the code base a bit by moving classes out of
OpenGLRenderer into separate headers/implementations. This makes the code
more manageable.
This change also adds documentation for implementation methods. The
undocumented methods are simply Skia's Canvas methods.
Change-Id: I54c68b443580a0129251dddc1a7ac95813d5289e
|