History log of /frameworks/base/libs/hwui/Program.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
caaaa66e57293e4a6f312649bf472eab84d5c7fe 27-Mar-2017 Romain Guy <romainguy@google.com> Convert bitmaps to sRGB/scRGB when they have a color profile

This change also fixes an issue with RGBA16F bitmaps when modulated
with a color (for instance by setting an alpha on the Paint object).

The color space conversion is currently done entirely in the shader,
by doing these operations in order:

1. Sample the texture
2. Un-premultiply alpha
3. Apply the EOTF
4. Multiply by the 3x3 color space matrix
5. Apply the OETF
6. Premultiply alpha

Optimizations:
- Steps 2 & 6 are skipped for opaque (common) bitmaps
- Step 3 is skipped when the color space's EOTF is close
to sRGB (Display P3 for instance). Instead, we use
a hardware sRGB fetch (when the GPU supports it)
- When step 3 is necessary, we use one of four standard
EOTF implementations, to save cycles when possible:
+ Linear (doesn't do anything)
+ Full parametric (ICC parametric curve type 4 as defined
in ICC.1:2004-10, section 10.15)
+ Limited parametric (ICC parametric curve type 3)
+ Gamma (ICC parametric curve type 0)

Color space conversion could be done using texture samplers
instead, for instance 3D LUTs, with or without transfer
functions baked in, or 1D LUTs for transfer functions. This
would result in dependent texture fetches which may or may
not be an advantage over an ALU based implementation. The
current solution favor the use of ALUs to save precious
bandwidth.

Test: CtsUiRenderingTests, CtsGraphicsTests
Bug: 32984164
Change-Id: I10bc3db515e13973b45220f129c66b23f0f7f8fe
/frameworks/base/libs/hwui/Program.h
636afc1877882dc9cf73b49f8a68c73cc418d8cd 07-Feb-2017 Romain Guy <romainguy@google.com> Apply transfer function when rendering with linear textures

RGBA16F bitmaps are always encoded in linear space, which means we must
apply the opto-electronic transfer function before we can render them
in the framebuffer.

Since our linear bitmaps are assumed to be scRGB, values can be negative.
The OETF is a slightly modified sRGB OETF:

sign(x) * OETF_sRGB(abs(x))

This effectively mirrors the OETF over the negative domain.

This CL also removes the "optimized" shader generation path. With
current compilers, the optimized path doesn't do anything of value
and makes ProgramCache difficult to maintain. Shader compilers inline
everything and are really good at folding expressions and removing
unused code.

Bug: 32984164
Test: CtsUiRenderingTestCases
Change-Id: Ieb458ad53574e3a8959aa6bccbbd2d1fe203cbc5
/frameworks/base/libs/hwui/Program.h
9c97e48fbe389180b4b64845f093c53c92c374f3 13-Dec-2016 sergeyv <sergeyv@google.com> HWUI: set correct sampler for external texture in shaders

Test: hwuimacro hwbitmapcompositeshader
bug:30999911
Change-Id: Ic63f7109a4a7069b62c0b21efae2d4ba7e6d64be
/frameworks/base/libs/hwui/Program.h
554ffeb8b7c836da43a637c59eedfc617895b19d 16-Nov-2016 sergeyv <sergeyv@google.com> Support hardware bitmaps in bitmap shaders

Test: hwuimacro bitmapShaderEglImage --onscreen.
bug:30999911
Change-Id: I9d16a1c217a4474841794cf27ce49e3f7823678e
/frameworks/base/libs/hwui/Program.h
c2f31df8b3b9a237e9abffc59c61804ad8495073 28-Oct-2016 Mike Reed <reed@google.com> use SkBlendMode

skbug.com/5814

Test: compile only
Change-Id: Ibbaff43df1117b2ca77fd8f917f03d88cc476330
(cherry picked from commit 26edbcba8a2ed4cb300e7f87e679e3b73cec2772)
/frameworks/base/libs/hwui/Program.h
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/Program.h
11718bc17bcfc56dfb9f4362eebf640b025c4415 22-Sep-2015 Chris Craik <ccraik@google.com> Remove shader based gamma approach

Also fixes some INIT_LOGD logs

Change-Id: I212a71a1e7b366aea41f7c3c8cc169d509d6e4a2
/frameworks/base/libs/hwui/Program.h
b9ce116dac378b4cf4490f265dcbd5704a1dd43c 21-Aug-2015 Chris Craik <ccraik@google.com> Switch several enums to enum classes

Change-Id: I00ecd0b61657196b51704f70ca31a9d1c1ac254e
/frameworks/base/libs/hwui/Program.h
0519c810a56bded1284fcb2ae40f438878c6585f 11-Feb-2015 Chris Craik <ccraik@google.com> Glop Bitmap and RoundRect clipping support

Change-Id: I4577546a5d2e5f084cc03f39a89db9231b8111ee
/frameworks/base/libs/hwui/Program.h
117bdbcfa3e8306dad21e7e01fa71b00cdfa7265 05-Feb-2015 Chris Craik <ccraik@google.com> Glop ColorFilter & VertexBuffer support, initial enable

Enables Glop rendering for supported Rects and VertexBuffers
Also removes unused Query object

Change-Id: Ibe227bc362685a153159f75077664f0947764e06
/frameworks/base/libs/hwui/Program.h
6c15ffa196fc9b7724c189d833c3435d8db12266 02-Feb-2015 Chris Craik <ccraik@google.com> Refactoring of Program ownership/lifecycle, and WIP Glop rendering path

Change-Id: I2549032790bddbc048b0bccc224ed8f386b4517c
/frameworks/base/libs/hwui/Program.h
64bb413a664001c95c8439cf097dc3033f4ed733 22-Nov-2014 Andreas Gampe <agampe@google.com> Revert "resolved conflicts for merge of 220c3f4f to master"

Reverted as hwui doesn't agree.

This reverts commit 8a902d9f24e83c87b054adb5836b4a5b8a257be9.

Change-Id: I109e7b02bee2921e2155ded6df36f52e6f574b5a
/frameworks/base/libs/hwui/Program.h
2ab8298dc37851aab4623ba3f98d71055d653a73 21-Nov-2014 Andreas Gampe <agampe@google.com> resolved conflicts for merge of 99377df1 to lmp-mr1-dev-plus-aosp

Change-Id: I3a98f55832ac447b1ed0dd129c7a93d088025943
42ddc18d108f789705ad4eb697ce9599ad322507 21-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Unused parameters in hwui

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
/frameworks/base/libs/hwui/Program.h
23d307c8d88f4a3849163b9e5b7cd11d0d4f372c 27-Oct-2014 John Reck <jreck@google.com> Cleanup debug options

Bug: 18138852
Bug: 18065434
Change-Id: Ibb07b73b147c2a8b287fe8aee3f6624582f21b00
/frameworks/base/libs/hwui/Program.h
91a8c7c62913c2597e3bf5a6d59d2ed5fc7ba4e0 12-Aug-2014 Chris Craik <ccraik@google.com> Switch to cos interpolation of shadow alpha

bug:16852257

Updates default shadow opacities to compensate.

Also, update variable/constant naming related to vertex alpha.

Change-Id: I9055b4ac3c9ac305ca9d515f21b52d6aa6dc9c5c
/frameworks/base/libs/hwui/Program.h
bf75945e7a1ae7c1000682716643c942c1e19ba6 12-Aug-2014 Chris Craik <ccraik@google.com> Rework shadow interpolation

bug:16852257

Use pow(alpha, 1.5) to avoid harsh edges on shadow alpha ramps.

Also adjusts shadow constants to compensate.

Change-Id: I5869956d7d292db2a8e496bc320084b6d64c3fb7
/frameworks/base/libs/hwui/Program.h
deeda3d337aed1eee218b89a7aba5992ced371f0 06-May-2014 Chris Craik <ccraik@google.com> Round rect outline clipping

Change-Id: Iee9cf4f719f6f1917507b69189ad114fa365917b
/frameworks/base/libs/hwui/Program.h
76d3a1b8d035d27bc80b0f2fc480a903bd001514 10-Dec-2013 Derek Sollenberger <djsollen@google.com> Removing SkiaColorFilter and inspecting the native object directly.

bug: 10650594
Change-Id: I4fcf66d008765afa0e35d011f58bc792183cb74f
/frameworks/base/libs/hwui/Program.h
d04a6b15f74035fd2068f34225825b55e94521f4 29-Jan-2014 Chris Craik <ccraik@google.com> Fix projection offset caching

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
/frameworks/base/libs/hwui/Program.h
e63f7c622a2086aefa80983c6f41b74fb166bb42 17-Oct-2013 Chris Craik <ccraik@google.com> Clean unused parameters, disable warnings

Change-Id: Iddb872f53075dd022eeef45265594d1c6a9e2bc0
/frameworks/base/libs/hwui/Program.h
6d29c8d5218cac0fb35f3b7c253f2bdebd44f15a 09-May-2013 Chris Craik <ccraik@google.com> Add tessellation path for points

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
/frameworks/base/libs/hwui/Program.h
78dd96d5af20f489f0e8b288617d57774ec284f7 03-May-2013 Romain Guy <romainguy@google.com> Add an on-screen overdraw counter

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
/frameworks/base/libs/hwui/Program.h
3b748a44c6bd2ea05fe16839caf73dbe50bd7ae9 18-Apr-2013 Romain Guy <romainguy@google.com> Pack preloaded framework assets in a texture atlas

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
/frameworks/base/libs/hwui/Program.h
096b8d96d539429de5e67b2821ef3f9ee0300842 01-Mar-2013 Chris Craik <ccraik@google.com> Add shader program selection shortcut

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
/frameworks/base/libs/hwui/Program.h
3ff0bfdd144bba3b023eda8c49b25fb0d0de8653 25-Feb-2013 Romain Guy <romainguy@google.com> Add new property to debug non-rectangular clip operations

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
/frameworks/base/libs/hwui/Program.h
ff316ec7a76e52572a2e89b691e6b3bba0cafba3 14-Feb-2013 Romain Guy <romainguy@google.com> Implement support for drawBitmapMesh's colors array

Change-Id: I3d901f6267c2918771ac30ff55c8d80c3ab5b725
/frameworks/base/libs/hwui/Program.h
65cd612face362d054a85d0f7e5881c59cd523be 11-Dec-2012 Chris Craik <ccraik@google.com> Add cap tessellation support

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
/frameworks/base/libs/hwui/Program.h
39284b763a09688468ed3799ebd2ebb76ea5dfd5 27-Sep-2012 Romain Guy <romainguy@google.com> Make gradients beautiful again
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
/frameworks/base/libs/hwui/Program.h
710f46d9d6a5bf9ea1c1833384caf61e1934124f 18-Sep-2012 Chris Craik <ccraik@google.com> Polygonal rendering of simple fill shapes

bug:4419017

Change-Id: If0428e1732139786cba15f54b285d880e4a56b89
/frameworks/base/libs/hwui/Program.h
a938f569ce206c1ed68d736181016b5b708c0084 14-Sep-2012 Romain Guy <romainguy@google.com> Fix modulation and gamma correction issues

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
/frameworks/base/libs/hwui/Program.h
6ebdc114e0d72137394f02bc8ffe9d7a782a65c4 01-Sep-2012 Chris Craik <ccraik@google.com> Varying-based AA rect drawing

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
/frameworks/base/libs/hwui/Program.h
42e1e0d482d774cf18a55773e434f02edb9e4462 30-Jul-2012 Romain Guy <romainguy@google.com> Improve gradients

Avoid using textures for common gradients (two stops from 0.0 to 1.0)

Change-Id: Iff55d21b126c8cfc4cfb701669f2339c8f6b131a
/frameworks/base/libs/hwui/Program.h
4121063313ac0d6f69f6253cac821d0c1c122086 17-Jul-2012 Romain Guy <romainguy@google.com> Add shader-based text gamma correction

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
/frameworks/base/libs/hwui/Program.h
f877308f77f7c6f3edd91618a092207dd3be9077 13-Jul-2012 Romain Guy <romainguy@google.com> Remove obsolete optimization

Change-Id: I2d43c009c62a7f4a4a2e0a6303bdfa692c4b8c8c
/frameworks/base/libs/hwui/Program.h
5baa3a62a97544669fba6d65a11c07f252e654dd 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
/frameworks/base/libs/hwui/Program.h
2d4fd364843d3efc6e6ee59ccc5beb513a86d789 14-Dec-2011 Romain Guy <romainguy@google.com> Reduce the number of active texture changes

Change-Id: I94046bdfe20740c26c8183822e3002d692fde7c4
/frameworks/base/libs/hwui/Program.h
f3a910b423db7ad79cf61518bdd9278c048ad0d8 13-Dec-2011 Romain Guy <romainguy@google.com> Optimize state changes

Change-Id: Iae59bc8dfd6427d0967472462cc1994987092827
/frameworks/base/libs/hwui/Program.h
3e263fac8c9c0e0fb242186b514a7af8efb40961 13-Dec-2011 Romain Guy <romainguy@google.com> Keep shaders to render properly

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
/frameworks/base/libs/hwui/Program.h
05bbde70fd2a3af737656b9f8c5a25b56429632e 09-Dec-2011 Romain Guy <romainguy@google.com> Free up resources by deleting shaders early on

Change-Id: I29a39775732c0a48d3e6823f7afa3e741cae8541
/frameworks/base/libs/hwui/Program.h
8a5cc92a150bae38ec43732d941b38bb381fe153 26-Apr-2011 Chet Haase <chet@google.com> Fix various hw-accelerated line/point bugs

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
/frameworks/base/libs/hwui/Program.h
67f27952c1bcb2230beef9b5ca0bf42edad436a9 08-Dec-2010 Romain Guy <romainguy@google.com> Correctly release the OpenGL Canvas on EGL error.

Change-Id: Ib31fd8445f7ce5f7aa7e0205de0e7db80d024fc2
/frameworks/base/libs/hwui/Program.h
5b3b35296e8b2c8d3f07d32bb645d5414db41a1d 28-Oct-2010 Romain Guy <romainguy@google.com> Optimize FBO drawing with regions.
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
/frameworks/base/libs/hwui/Program.h
707b2f78ccaa09965d7e030fda3a883ce9b75ea8 12-Oct-2010 Romain Guy <romainguy@google.com> Optimize GLSL shaders.

Change-Id: I9a5e01bced63d8da0c61330a543a2b805388a59d
/frameworks/base/libs/hwui/Program.h
889f8d1403761d5668115ced6cbb3f767cfe966d 29-Jul-2010 Romain Guy <romainguy@google.com> Moved all the rendering code to the new shader generator.

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
/frameworks/base/libs/hwui/Program.h
ac670c0433d19397d4e36ced2110475b6f54fe26 28-Jul-2010 Romain Guy <romainguy@google.com> Generate shaders to cover all possible cases.

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
/frameworks/base/libs/hwui/Program.h
694b519ac647fe998fd396fe0784cc8e179aadc4 22-Jul-2010 Romain Guy <romainguy@google.com> Add text rendering.

Change-Id: Ibe5a9fa844d531b31b55e43de403a98d49f659b9
/frameworks/base/libs/hwui/Program.h
c0ac193b9415680f0a69e20a3f5f22d16f8053be 20-Jul-2010 Romain Guy <romainguy@google.com> Add support for linear gradients.

Change-Id: Id15329da065045b3f06fdaed615f33cd57608496
/frameworks/base/libs/hwui/Program.h
f9764a4f532561f6e2e985ff3b25112f1132ce44 17-Jul-2010 Romain Guy <romainguy@android.com> Add program for linear gradient.

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
/frameworks/base/libs/hwui/Program.h
6926c72e25b8dec3dd4b84af0819fa1937ae7296 13-Jul-2010 Romain Guy <romainguy@google.com> Correctly support pre-multiplied alpha, optimizations, more stuff.

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
/frameworks/base/libs/hwui/Program.h
260e102162322958cf17dbd895cd6bd30dc87e32 12-Jul-2010 Romain Guy <romainguy@google.com> Optimize shader binding changes.

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
/frameworks/base/libs/hwui/Program.h
0b9db91c3dc8007b47c8fd4fb9dd85be97201a88 10-Jul-2010 Romain Guy <romainguy@google.com> Remove math from the vertex shader.

Change-Id: I02847a60a8734bf8b3d29ec12e76297795095e38
/frameworks/base/libs/hwui/Program.h
5cbbce535744b89df5ecea95de21ee3733298260 28-Jun-2010 Romain Guy <romainguy@android.com> Reduced the complexity of layers composition.

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
/frameworks/base/libs/hwui/Program.h