summaryrefslogtreecommitdiffstats
path: root/libs/hwui/TextureCache.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove all Dalvik allocations from Cavnas.drawBitmap(int[], ...)Romain Guy2012-05-141-0/+10
| | | | Change-Id: Ie28538a2104d21154fdc78a56525e7403f08287d
* 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
* Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-061-2/+2
| | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
* Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-031-2/+2
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
* Clip text correctlyRomain Guy2011-12-051-1/+2
| | | | | | | | | | | | | | | | | Bug #5706056 A newly introduced optimization relied on the display list renderer to properly measure text to perform fast clipping. The paint used to measure text needs to have AA and glyph id encoding set to return the correct results. Unfortunately these properties were set by the GL renderer and not by the display list renderer. This change simply sets the properties in the display list renderer instead. This change also improves the error message printed out when the application attempts to use a bitmap larger than the max texture size. Change-Id: I4d84e1c7d194aed9ad476f69434eaa2c8f3836a8
* Optimize away unnecessary state changesRomain Guy2011-11-301-4/+10
| | | | Change-Id: I0f6816f9f6234853575ecee5033186ad19e76380
* Memory optimizations for libhwuiRomain Guy2011-11-041-1/+30
| | | | | | | | | | | Bug #5566149 Lazily initialize font renderers Keep 60% of the texture cache when an app goes to the background Delete least used font renderer when going to the background Delete all font renderers on full memory trim Change-Id: I3c2454d46dc1107ec0f0f72a9ce69cbbcc8825e7
* Make sure we have a current EGL context when invoking EGLRomain Guy2011-07-261-1/+1
| | | | | | Bug #5081795 Change-Id: Iee3382d362a71c1e6c5c498b319bf7f7bcf5a2f0
* 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
* Correctly blend translucent GIF bitmaps.Romain Guy2011-02-241-5/+3
| | | | Change-Id: Ifeb2c1d97a4c6dfeb1a7b5b26f1a3153e9f8da7f
* Always render text underline extra.Romain Guy2011-01-231-1/+1
| | | | | | Bug #3381287 Change-Id: Ibfbc9c51c8dccef216daccc37d835e5dbf143a6a
* Log only 1 line per process when using OpenGLRenderer.Romain Guy2011-01-211-2/+2
| | | | Change-Id: Idbdd6b84f31301e58ed53e0d50fd61fece192dfa
* Free resources only from the GL context thread.Romain Guy2010-11-111-12/+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 new runtime debug flags.Romain Guy2010-11-101-0/+8
| | | | Change-Id: I07955de166a89b5053c6c13f250bb3e2936ca86e
* Correctly remove unused paths from the cache.Romain Guy2010-11-091-4/+4
| | | | Change-Id: I41d9334dcd9871634037344ab49bf69383498161
* Optimize FBO drawing with regions.Romain Guy2010-11-021-2/+6
| | | | | | | | | 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
* DisplayList optimizations and fixes.Chet Haase2010-10-261-0/+5
| | | | | | | | We now use a copy of SkPaint objects to avoid having it changed from under us. We reuse copies that have not changed. We also copy the SkMatrix every time to avoid the same problem. Change-Id: If3fd80698f2d43ea16d23302063e0fd8d0549027
* Add support for paletted textures.Romain Guy2010-10-051-1/+21
| | | | Change-Id: I36e6069bd58f78c609cdd1f3e4560c98f128f48e
* Fix OpenGL errors in various places.Romain Guy2010-09-221-2/+2
| | | Change-Id: I3a4e115d8fb13b6c443e65460d92987b16f2524c
* Fix texture corruption issue, faster re-upload of textures.Romain Guy2010-09-221-11/+23
| | | | | | Bug #2950691 Change-Id: I57e2bc1d1a23e8683c25de7d09d6f5af2df59f41
* Purge Skia objects from GL caches as needed.Romain Guy2010-09-081-2/+7
| | | | Change-Id: I754c671cf790ad5ae8bf047ad328034217da4ecc
* Fix possible infinite loop when purging textures.Romain Guy2010-09-081-5/+16
| | | | Change-Id: Ib05b398ae03e734da2dab0496df416fed4570b1c
* 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