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
|