summaryrefslogtreecommitdiffstats
path: root/libs/hwui/TextureCache.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use only one GL context per process, share chaches.Romain Guy2010-08-241-4/+23
| | | | Change-Id: Ieabaa25338d2f4b8d4fd90e7401ad6e7452eae11
* Update OpenGLRenderer test to test opaque ARGB8888 bitmaps.Romain Guy2010-08-191-1/+3
| | | | Change-Id: I7159825f4b1d6f5a1cd09ec091994801b52b6bda
* Make libhwui entirely optional.Romain Guy2010-08-081-4/+2
| | | | | | | | | | | | The makefile variable USE_OPENGL_RENDERER must be set to true to compile libhwui and the related code in the JNI layer. This change also removes obsolete APIs from Canvas that must not be used and would be confusing if left in. These APIs were remnants of our first attempt at an OpenGL renderer for the view hierarchy and had not been taken out before Android 1.0 was released. Change-Id: I2475ff1307212bab26c926724f3c508681c7dae1
* Enforce maximum texture size.Romain Guy2010-08-071-0/+10
| | | | | | | | | | | | 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/+3
| | | | Change-Id: I4f29ed96ea11118b391fb957e1e4d1b8fcef1537
* Add a way to query GL extensions.Romain Guy2010-07-221-0/+5
| | | | Change-Id: Ic27dbf72289dacf641b640a749fbd40c12cd474f
* Add support for linear gradients.Romain Guy2010-07-191-0/+1
| | | | Change-Id: Id15329da065045b3f06fdaed615f33cd57608496
* Optimize textures binding.Romain Guy2010-07-161-2/+0
| | | | | | | The renderer is still changing textures' wrap modes every time, this will require a latter optimization. Change-Id: I3eb92cb8c886c4a692b7f0ca759911f9371d4d2c
* Enable 32-bits only assets.Romain Guy2010-07-131-1/+1
| | | | | | Go away dithering! Change-Id: Iee5ee2e9430606e732d9b0abb3adc9f68275bd6d
* 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-2/+2
| | | | | | | | | | | | | | 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
* Remove extra leftover logs and use uint32_t instead of unsigned int.Romain Guy2010-07-021-6/+6
| | | | Change-Id: I944f82fe3255de38dc04048cc8bd861f578f01a7
* Track the size in memory of the texture cache.Romain Guy2010-07-011-9/+60
| | | | | | | | | The texture cache was previously checking the number of stored textures. This was not very useful as this could easily lead to an abuse of memory. The new cache instead tracks the total size occupied in RAM by the cached textures. When a new texture is generated, older textures are kicked out as needed. Change-Id: Ib27142f4a018d5bf84774c1fb6f45a67a85f20bc
* Add implementation for drawBitmap(Bitmap, Rect, Rect, Paint)Romain Guy2010-06-301-0/+1
| | | | Change-Id: I10904d2325a5431d15801aebcec1048715678e8c
* Add implementation for drawBitmap().Romain Guy2010-06-301-10/+20
| | | | Change-Id: Iada9325f3c5642b61c2e0c4cd80bcfbc92cb491e
* Remove unnecessary return and add bitmap generation ID tracking.Romain Guy2010-06-301-5/+10
| | | | Change-Id: Icf5e0635e789f5ea53268c22fad51cf733b5b1a6
* Fix the build.Romain Guy2010-06-301-4/+5
| | | | Change-Id: I08bd6daf25351daca3ae552e1cfcfce85eefa73b
* Add hooks for drawBitmap().Romain Guy2010-06-301-0/+86
Change-Id: I58e962c3a8b2bc75c2605fe369ad3002579d86e0 Add texture cache. Change-Id: I1c0e5581d228869e114438258a1014e33e024ad7