summaryrefslogtreecommitdiffstats
path: root/libs/hwui/GradientCache.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Glop ColorFilter & VertexBuffer support, initial enableChris Craik2015-02-061-13/+6
| | | | | | | Enables Glop rendering for supported Rects and VertexBuffers Also removes unused Query object Change-Id: Ibe227bc362685a153159f75077664f0947764e06
* Refactor blending and texture gl stateChris Craik2015-01-301-1/+1
| | | | Change-Id: Ia6b3c8b2afd3dfcee7f3ce401d846b789612054a
* Add overrides and switch to nullptr keyword for all filesChris Craik2015-01-051-1/+1
| | | | | | | Adds remaining missing overrides and nullptr usages, missed due to an extreme failure in tool usage. Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
* Cleanup various clang warnings, use unique_ptrs in several placesChris Craik2014-12-231-2/+2
| | | | Change-Id: I347904b25e51fcc7de14b1e72f1acd0f6ba26f3f
* Clean unused parameters, disable warningsChris Craik2013-10-171-4/+3
| | | | Change-Id: Iddb872f53075dd022eeef45265594d1c6a9e2bc0
* Add new Query class for debuggingRomain Guy2013-06-131-1/+1
| | | | | | | This class can be used to perform occlusion queries. An occlusion query can be used to test whether an object is entirely hidden or not. Change-Id: Ida456df81dbe008a64d3ff4cb7879340785c6abf
* Assume a texture is unbound after deleting itRomain Guy2013-06-061-1/+1
| | | | | | | | | | | Bug #9316260 The GL specification indicates that deleting a bound texture has the side effect of binding the default texture (name=0). This change replaces all calls to glDeleteTextures() by Caches::deleteTexture() to properly keep track of texture bindings. Change-Id: Ifbc60ef433e0f9776a668dd5bd5f0adbc65a77a0
* Introduce Caches::bindTexture() to reduce glBindTexture callsRomain Guy2013-06-041-2/+2
| | | | Change-Id: Ic345422567c020c0a9035ff51dcf2ae2a1fc59f4
* Properly computer gradient textures widthRomain Guy2013-04-121-2/+5
| | | | | | Only on devices that do not have the npot extension Change-Id: I472a13dc707d2abaf5fcc06f99c9da343b333558
* Use float textures to render gradients when possibleRomain Guy2013-04-051-52/+90
| | | | | | | | | | | Float textures offer better precision for dithering. In addition this change removes two uniforms from gradient shaders. These uniforms were used to dither gradients but their value is a build time constant. Instead we hardcode the value directly in the shader source at compile time. Change-Id: I05e9fd3eef93771843bbd91b453274452dfaefee
* Precache paths from a worker threadRomain Guy2013-03-111-1/+0
| | | | Change-Id: I3e7b53d67e0e03e403beaf55c39350ead7f1e309
* Add a RenderBuffer object to store stencil buffers.Romain Guy2013-02-071-1/+1
| | | | | | | | | | | | | | | | | | 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
* Remove unnecessary & uninitialized variableRomain Guy2013-01-031-8/+1
| | | | | | | | | | | Bug #7728929 The uninitialized variable was taken into account to compute the hash of gradient cache entries, thus causing cache corruptions and sometimes infinite loops (it would also cause the cache to fill up.) Change-Id: Ic807a9bf901888b121a6a781a81dafc33075ed2a
* Use LruCache instead of GenerationCache in libhwuiRomain Guy2012-11-291-2/+30
| | | | Change-Id: Ic26ddc7151eb5462bcd243b21daf7187ed6d3bec
* Revert "Add more support for transformed clip rects and paths"Mathias Agopian2012-08-311-1/+1
| | | | | | | | | this introduced a dead lock in GradientCache's ctor. This reverts commit dfe082f63e94cde9aee271c94d13de5e7217e036. Bug: 7096001 Change-Id: I57b8bbab11fb7cb502fa58e3bbf5d19864db874f
* Add more support for transformed clip rects and pathsRomain Guy2012-08-311-1/+1
| | | | Change-Id: I41791b1e1bffef77d503dc9e52428395d2309688
* Pre-multiply color components for 2-stop gradientsRomain Guy2012-08-291-4/+6
| | | | | | Bug #7033344 Change-Id: Ia168501f1dc56ba7a1bb0c55078320432309a66a
* Reduce gradients textures size whenever possibleRomain Guy2012-08-081-2/+7
| | | | Change-Id: Ifd58625ee62edac3b5d20b77553cb98b6fa2b46e
* Improve gradientsRomain Guy2012-07-311-42/+98
| | | | | | Avoid using textures for common gradients (two stops from 0.0 to 1.0) Change-Id: Iff55d21b126c8cfc4cfb701669f2339c8f6b131a
* Make gradients look slightly betterRomain Guy2012-07-201-2/+2
| | | | Change-Id: Ib12c628a88b9ec6af1214ce6e5cb14cfde40485e
* Clamp gradient textures to max GL texture sizeRomain Guy2012-07-201-3/+6
| | | | Change-Id: I8ce4e50988f5194fe5ce4bde7945ec01673af3cd
* Optimize gradient texturesRomain Guy2012-07-181-1/+1
| | | | | | | Compute the size of the backing textures based on the maximum possible number of shades in the gradient. Change-Id: I2d7f20477d31b81e9735f2c1d83ebdd0dbcbe340
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-1/+1
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Various OpenGL optimizationsRomain Guy2011-12-121-2/+2
| | | | Change-Id: Ib0742c96f10f5f50e7e5148b742c31b6c232d127
* Reduce the amount of data cached by the gradients cache.Romain Guy2011-08-011-25/+15
| | | | Change-Id: I8546f5a5ecf38031c9a40bdcc434d4c7f22da63d
* Improve rendering performance on some GPUsRomain Guy2011-07-251-5/+2
| | | | | | | | This change sets textures filtering to GL_NEAREST by default. GL_LINEAR filtering is only used when textures are transformed with a scale or a rotation. This helps save a couple of fps on some GPUs. Change-Id: I1efaa452c2c79905f00238e54d886a37203a2ac1
* Log only 1 line per process when using OpenGLRenderer.Romain Guy2011-01-211-2/+3
| | | | Change-Id: Idbdd6b84f31301e58ed53e0d50fd61fece192dfa
* Free resources only from the GL context thread.Romain Guy2010-11-111-11/+14
| | | | | | | | | | Bug #3179882 Resources were freed following garbage collections on a worker thread. This worker thread had no EGL context, which would cause the renderer to incorrectly assume that the memory was liberated. Change-Id: Ifdb51f94ddf42641e8654522787bfac532976c7c
* Add support for SweepGradient in the GL renderer.Romain Guy2010-09-201-1/+1
| | | | Change-Id: I7aa397ed4e34655ead9ba1f5b4ce087665e0f022
* Purge Skia objects from GL caches as needed.Romain Guy2010-09-081-0/+14
| | | | Change-Id: I754c671cf790ad5ae8bf047ad328034217da4ecc
* Use only one GL context per process, share chaches.Romain Guy2010-08-241-0/+15
| | | | Change-Id: Ieabaa25338d2f4b8d4fd90e7401ad6e7452eae11
* Enforce maximum texture size.Romain Guy2010-08-071-2/+1
| | | | | | | | | | | | 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
* Add support for linear gradients.Romain Guy2010-07-191-0/+160
Change-Id: Id15329da065045b3f06fdaed615f33cd57608496