summaryrefslogtreecommitdiffstats
path: root/libs/hwui/OpenGLRenderer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add hooks for hardware accelerated WebView.Romain Guy2010-08-311-0/+23
| | | | Change-Id: I907cdec8a67594f87749ac46bda85f04af5a2003
* Apply gamma correction to font rendering.Romain Guy2010-08-271-3/+5
| | | | Change-Id: I1b05f40e356221b2a5eb9400e67d77ecd98ed6c4
* Use only one GL context per process, share chaches.Romain Guy2010-08-241-113/+51
| | | | Change-Id: Ieabaa25338d2f4b8d4fd90e7401ad6e7452eae11
* Add support for textScaleX.Romain Guy2010-08-201-0/+12
| | | | | | | This will not look great because we render fonts using bitmaps, not paths. Change-Id: I01b87b81bfbdbfa28460a5d5309d38e2a65e77c4
* Fix drawing issues with layers.Romain Guy2010-08-181-13/+34
| | | | | | | Prior to this change layers would clip their content incorrectly. They would also not apply alpha properly. Change-Id: Id7b3aaa7dbdc51de68fe050e64458f68e40503fd
* Fix the build.Romain Guy2010-08-181-4/+1
| | | | Change-Id: I8bd418ba21e3e3f68b793030398d1a5e933dfb19
* Layers were using an extra Snapshot causing extra clipping.Romain Guy2010-08-181-35/+23
| | | | | | Bug #2919310 Change-Id: I72ccd44bba7a3f3db72f581aa96198b6226e4478
* Fix save()/restore() issues in the OpenGL renderer.Romain Guy2010-08-171-12/+19
| | | | | | The save stack now behaves exactly like in Skia. Change-Id: If7e642f41f2c8f693f6e8c26cba81507d466562e
* Correctly set the viewport in layers.Romain Guy2010-08-171-44/+44
| | | | | | Bug #2919295 Change-Id: I16ce79ab0d5747cb01c6c1abe531da3dfd93fb54
* Cleanup, better code reuse.Romain Guy2010-08-161-157/+145
| | | | Change-Id: Ib86a7309ae579cce3b7cf464782c34e70a74c616
* Add drop shadows.Romain Guy2010-08-131-51/+113
| | | | Change-Id: Ic6a72409d4785968d1fbdff229f17ee5c00b240b
* Bunch of fixes.Romain Guy2010-08-111-2/+10
| | | | | | Fixes memory leak, fixes multiple context support, fix 3d transforms. Change-Id: I7462cfbc57857dbd4de4e76b9d4cba58a1bce77b
* Add support for text underline and strikethru.Romain Guy2010-08-101-2/+49
| | | | Change-Id: I3a0e6643d7cafbdd06d9a908c8cf9347dcaba146
* Fix tons of bugs and add new text rendering support.Romain Guy2010-08-101-0/+4
| | | | Change-Id: I326c66b10784006f6df2f12d38e120cef94cd0d7
* Enforce maximum texture size.Romain Guy2010-08-071-0/+5
| | | | | | | | | | | | When an app tries to render a bitmap or path larger than the GPU's maximum texture size, the drawing command is ignored and a warning is logged. This change also makes texture drawing more robust by catching potential errors during texture creation. This change also fixes a crash in the FontRenderer. The destructor would sometimes try to free an uninitialized array. Change-Id: I95ae0939c52192d97b340aa02417bf6d0c962c57
* Automatically cleanup textures that don't fit in the cache.Romain Guy2010-08-061-1/+8
| | | | Change-Id: I4f29ed96ea11118b391fb957e1e4d1b8fcef1537
* Add support for paths.Romain Guy2010-08-051-2/+78
| | | | | | | Rendering is implementing by rasterizing the paths into A8 textures. This cna be extremely inefficient if the path changes often. Change-Id: I609343f304ae38e0d319359403ee73b9b5b3c93a
* Add support for ColorFilters.Romain Guy2010-08-021-3/+36
| | | | | | Color filters are fully supported and can be used with shaders. Change-Id: Id90ccf1c81cb462f2431f366f3f8f710d7971e04
* Refactor Skia shaders handling.Romain Guy2010-07-301-180/+47
| | | | | | | | With this change, Skia shaders can easily be applied to any mesh. This change also supports ComposeShader. For instance, this can be used to blend a gradient and a bitmap togehter and paint a string of text with the result. Change-Id: I701c2f9cf7f89b2ff58005e8a1d0d80ccf4a4aea
* Fix improper clipping after a save()Romain Guy2010-07-301-2/+3
| | | | Change-Id: I13426a67f20d77e2710bd500d82884098f4be97c
* Fix gradients rendering and destructor crashes.Romain Guy2010-07-291-22/+12
| | | | | | | This changes binds all textures to GL_TEXTURE0, this will have to be changed when combining shader capabilities. Change-Id: I02df4f5ba41e9b01ffa52fd7c26b41477c7ed18f
* Moved all the rendering code to the new shader generator.Romain Guy2010-07-291-77/+117
| | | | | | | | | | | 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
* Generate shaders to cover all possible cases.Romain Guy2010-07-271-26/+31
| | | | | | | | | | 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
* When font cache still has empty space,Alex Sakhartchouk2010-07-261-1/+1
| | | | | | precache some commonly used characters to reduce studder. Change-Id: I1f66f57482c4a025672dfd1d8ecaf2b9736cd9a0
* Add text alignment support to drawText().Romain Guy2010-07-231-2/+21
| | | | | | This change also integrates better support for RTL text. Change-Id: I6da8f5cf5dc28ca7cf1b22e27b0d853c919e8481
* Cleanup, added properties for the FontRenderer.Romain Guy2010-07-231-6/+2
| | | | Change-Id: I909c74815d3ac394438ad8071d17fef5401dbeed
* Add support for text culling.Romain Guy2010-07-221-6/+4
| | | | Change-Id: Ibf0adacdc5c64d40a8000b21d7cb0797d63efe29
* Add text rendering.Romain Guy2010-07-211-1/+36
| | | | Change-Id: Ibe5a9fa844d531b31b55e43de403a98d49f659b9
* Add preliminary support for text rendering.Romain Guy2010-07-201-25/+31
| | | | Change-Id: I547eb631dbda24d13960d54b4144fb8908fd8a49
* Add support for linear gradients.Romain Guy2010-07-191-13/+80
| | | | Change-Id: Id15329da065045b3f06fdaed615f33cd57608496
* Add program for linear gradient.Romain Guy2010-07-161-1/+5
| | | | | | | | 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 plumbing to support gradients in OpenGL renderer.Romain Guy2010-07-161-2/+17
| | | | | | | | | | The LinearGradient class keeps a copy of the various parameters that define the gradient. The copies are native arrays to avoid copying Java arrays on every draw call. The gradient code path is implemented until OpenGLRenderer::drawRect() (see TODO.) The actual gradient implementation will be added in a latter change. Change-Id: I9300d250ef5e2e9c2e097c3116ee71dfc9d752d8
* Optimize textures binding.Romain Guy2010-07-161-4/+7
| | | | | | | The renderer is still changing textures' wrap modes every time, this will require a latter optimization. Change-Id: I3eb92cb8c886c4a692b7f0ca759911f9371d4d2c
* Improve clip support (add intersect, union and replace.)Romain Guy2010-07-161-35/+15
| | | | | | | This change also modifies the way the clip is stored. The clip is now always stored in screen-space coordinates. Change-Id: I96375784d82dfe975bc6477a159e6866e7052487
* Add support for BitmapShader.Romain Guy2010-07-151-33/+121
| | | | | | This change also fixes an issue with the clip and layers. Change-Id: I5fd9832098d8cf7ae8eb781ff9bffe7defaea279
* Do not apply transforms when using drawColor().Romain Guy2010-07-141-5/+10
| | | | | | This fixes an issue in the way the clip transformations were applied. Change-Id: I91e7b5d15baf244d1280e48938282bb33609081d
* Cleanup: remove unnecessary parameters.Romain Guy2010-07-131-18/+13
| | | | Change-Id: I5956ef1db6be28a01369387aaeeb65a94656c48c
* Fix premultiplied alpha.Romain Guy2010-07-121-1/+1
| | | | Change-Id: I08da422c5350503e1f4f27b9890f15a813d0c6c7
* Correctly support pre-multiplied alpha, optimizations, more stuff.Romain Guy2010-07-121-23/+50
| | | | | | | | | | | | | | 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
* Optimize shader binding changes.Romain Guy2010-07-121-10/+17
| | | | | | | 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
* Remove math from the vertex shader.Romain Guy2010-07-091-2/+2
| | | | Change-Id: I02847a60a8734bf8b3d29ec12e76297795095e38
* Fix alpha blending and improve fragment shaders performance.Romain Guy2010-07-091-6/+5
| | | | Change-Id: Ib74f6941d25ca6f6a41708e541174eaa7e8d9bc2
* Refactoring to move vertex computing to the Patch class.Romain Guy2010-07-091-91/+2
| | | | | | This change is mostly cleanup to keep less code in OpenGLRenderer. Change-Id: I954375143b2943829457ab470423729b60b844f5
* Optimize blending state changes.Romain Guy2010-07-091-48/+48
| | | | Change-Id: I7c22a8aecccb8b5abfcf7243f049a4ef3cf3979a
* Draw n-patches using OpenGL.Romain Guy2010-07-081-10/+121
| | | | | | Currently only tested with title bars and buttons. Change-Id: I8263a9281898dc0e943b1b8412827fe55639b9d6
* Create FBOs in LayerCache.Romain Guy2010-07-081-61/+10
| | | | | | | This moves a bit of code away from OpenGLRenderer and matches what happens with the TextureCache. Change-Id: I3c67f54f83d7240770daa015861c0e75a1dd8c42
* Add support to draw 9patches in OpenGL.Romain Guy2010-07-071-1/+7
| | | | | | | This change only adds the necessary API and stubs. The implementation will be added in another change. Change-Id: Ie50b8aff5868e78796cee331df15bdbf990d2ea1
* Simpler way to deal with the FBO multi-cache.Romain Guy2010-07-071-1/+1
| | | | | | | | This change removes the need for the SortedList and instead just add a generated id to each FBO stored in the cache. This is an artificial way to store several FBOs with the same dimensions. Change-Id: I9638364e9bdc0f2391261937a0c86096f20505bf
* Optimize FBO cache.Romain Guy2010-07-071-1/+1
| | | | | | | | | This change introduces a new generational cache called GenerationMultiCache that can store several values with the same key. This can be used to use multiple layers of the same size at the same time, without recreating them over and over again. Change-Id: I425466a20908b862c5f464a0f9e582ec18cbd7ac
* Add a layer (FBO) cache.Romain Guy2010-07-061-40/+100
| | | | | | | | | | | | | | The cache is used to draw layers so that a new texture does not have to be recreated every time a call to saveLayer() happens. The FBO cache used a KeyedVector, which is a bad idea. The cache should be able to store several FBOs of the same size (this happens a lot during scrolling with fading edges for instance.) This will be changed in a future CL. Change-Id: Ic316189e625f0dbcf0d273a71cc981a433d48726