History log of /frameworks/base/libs/hwui/PathCache.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
98fa4f9e7b33a3004ce9142c9acd4300391b9a0e 25-Oct-2016 sergeyv <sergeyv@google.com> Use Bitmap in Texture.upload

Test: refactoring cl.
bug:32216791

Change-Id: Ib0b16c878d8371e0471e9a502f55626ec5999c60
/frameworks/base/libs/hwui/PathCache.cpp
260ab726486317496bc12a57d599ea96dcde3284 07-Oct-2016 Mike Reed <reed@google.com> use SkBlendMode instead of SkXfermode
use sk_sp versions of paint setters/getters

Change-Id: I86591a0a8ec92e6039776cbf00424ea24f585b28
/frameworks/base/libs/hwui/PathCache.cpp
cecec702eb436ddfec1e1c68d379a4dc1ef37f63 12-Oct-2016 John Reck <jreck@google.com> Fatal abort on invalid state

Use mCaches.size() to track item count instead of trying
to do it manually on the side.

Bug: 31856965
Test: manual, minimal. Repro steps for bug are unknown, fix
is speculative as a result
Change-Id: Ic32f27262548a99be95440881420d224ede4db74
/frameworks/base/libs/hwui/PathCache.cpp
4a3b0c7587dc995e00ed4e7d7ed61544f7715d2c 23-Aug-2016 John Reck <jreck@google.com> resolve merge conflicts of 24e38ab to stage-aosp-master

Change-Id: I25844e17d2d6371ed786833c756051d19d0abec4
4b505376cb1d77de39d12f4f8bc88e111fbbdc5f 24-Jun-2016 caiqinl <caiqinl@codeaurora.org> Fix native memory leak caused by small HWUI path cache creation

HWUI calculates the texture size as w*h*bpp. In some cases, the
calculated path cache is small, but the actual memory allocated
in driver is 4k/8k/16k, much bigger than HWUI calculates.

Example: a 5*65 alpha texture, HWUI think it is 5*65*1 = 325 bytes,
but driver allocates 8K. An app can allocates up to 32M path textures,
which actually consumes 32M*(8*1024/325) = 806M memory.

Here we limit the number of path texture in the cache to 256, it
should be a pretty generous global limit.

Change-Id: I890819b73bb0b7f63e96bc3d9d0ff9469c16838c
/frameworks/base/libs/hwui/PathCache.cpp
89561e6e4201aebc78a76ac055071ad2149db704 05-Aug-2016 sergeyv <sergeyv@google.com> HWUI: Fix snapping in path rendering

bug:30444274
Change-Id: Ib10058659af47625b366c26e0b872fa3f1854cd0
/frameworks/base/libs/hwui/PathCache.cpp
d93b9bde90522a7da6a0875a9f33ef9361088449 05-Aug-2016 sergeyv <sergeyv@google.com> HWUI: Cleanup PathCache

Change-Id: I947ae79db2b0505ebbacecf15e685b4219451707
/frameworks/base/libs/hwui/PathCache.cpp
7224e2b624daea67b5653285c9640f170c096bdb 08-Apr-2016 sergeyv <sergeyv@google.com> Stop comparing Descriptions with memcmp

bug:27894959
Change-Id: I379c11381c08f6f77577a914638b32415768f26e
/frameworks/base/libs/hwui/PathCache.cpp
48a8f431fa52ae2ee25ffba9d20676f03bb710ff 06-Feb-2016 Chris Craik <ccraik@google.com> Move several property queries to Properties class

bug:17478770

This removes a lot of redundant property query code, and puts the
queries all in one place, so defining them automatically will be simpler
in the future.

Change-Id: I0428550e6081f07bc6554ffdf73b22284325abb8
/frameworks/base/libs/hwui/PathCache.cpp
38e0c32852e3b9d8ca4a9d3791577f52536419cb 10-Nov-2015 John Reck <jreck@google.com> Track texture memory globally

Also mostly consolidates texture creation

Change-Id: Ifea01303afda531dcec99b8fe2a0f64cf2f24420
/frameworks/base/libs/hwui/PathCache.cpp
9557dcd53b5e2926f6d500e4e91c6b4f4abacdf3 11-Nov-2015 John Reck <jreck@google.com> Merge "Fix HWUI Path Cache dangling pointer" am: 37bf3ec9d2 am: 7516d4d866
am: 1b85ce17a3

* commit '1b85ce17a316973a170b3932f2d0a9b02063eaa3':
Fix HWUI Path Cache dangling pointer
2e4f67c388aff0def50dd619388624f1dbe359ad 04-Nov-2015 Digish Pandya <digishp@codeaurora.org> Fix HWUI Path Cache dangling pointer

When precache, PathTexture is added to PathCache, and it is released after drawn if we want to clean it.
But the PathCache LRU still holds the entry of the PathTexture object. When trim the cache in
the end of each frame, LRU finds that its mListener is not NULL and invoke the functor, however,
mListerer points to the released PathTexture object and is a dangling pointer, thus leads to crash.
Smart pointer don't help here since they only manage scopes, while PathTexture is also controled by
its cleanup field.
The fix is to also remove the LRU entry of PathTexture*, it will also release the texture object
and there won't be texture leaks.

Change-Id: Iaa0621df5dc71532e9e75b38ad94384353930b95
/frameworks/base/libs/hwui/PathCache.cpp
6b50780363d3bb8db600c770183fa07677509ae8 03-Nov-2015 John Reck <jreck@google.com> Remove almost-all android::Singleton users

Bug: 25426213
Change-Id: I88e6206e8915cce95c3a8a8a82a4bb8fbf668141
/frameworks/base/libs/hwui/PathCache.cpp
11718bc17bcfc56dfb9f4362eebf640b025c4415 22-Sep-2015 Chris Craik <ccraik@google.com> Remove shader based gamma approach

Also fixes some INIT_LOGD logs

Change-Id: I212a71a1e7b366aea41f7c3c8cc169d509d6e4a2
/frameworks/base/libs/hwui/PathCache.cpp
272a685f17cc4828257e521a6f62b7b17870f75e 30-Jul-2015 John Reck <jreck@google.com> Replace most usages of utils/Vector.h

Change-Id: I540d1b3523244d6c71fc52d6fb30555271c25644
/frameworks/base/libs/hwui/PathCache.cpp
5a4690bf26932c0d6940e4af8516d920e09ae81a 14-Jul-2015 Chris Craik <ccraik@google.com> Clean up unncessary defines

LOG_TAG and TRACE_TAG are already defined in the makefile

Change-Id: I9e53e3dacbe018441edd74cb7c8c90846defee74
/frameworks/base/libs/hwui/PathCache.cpp
e6a15ee3d0c78eb3f2551d73a7d238c3d8d2f075 08-Jul-2015 Chris Craik <ccraik@google.com> Remove all usage of fmin and fmax

bug:22208220

Removes needless call, and upconversion to doubles in multiple places.

Change-Id: I1b949fa5f206446ac34de800154c0147d6bd8034
/frameworks/base/libs/hwui/PathCache.cpp
cf8426c4eb60924d2387e0769d6cdc426178a31f 14-May-2015 Chris Craik <ccraik@google.com> Add tracing for path texture upload

Change-Id: I4918e5a3c7e01b321d428b20babd48bf69a708e4
/frameworks/base/libs/hwui/PathCache.cpp
42455fc9182cfe0c9f91c77712541888ca61df9e 12-May-2015 Chris Craik <ccraik@google.com> Remove usage of Texture::cleanup in PathCache

bug:21039605

Was causing double-deletes, is unneeded.

Change-Id: I5c0a21d076fae7039d777ca09b21492f97fea98b
/frameworks/base/libs/hwui/PathCache.cpp
2507c34d91bb0d722b6012e85cb47387b2aa6873 04-May-2015 Chris Craik <ccraik@google.com> Cleanup properties

bug:19967854

Separate properties from Caches, into static, RenderThread-only class.

Also rewrites the means for java to set properties to correctly handle
threading, and adds an override for profile bars so that SysUi doesn't clutter
the screen with them.

Change-Id: I6e21a96065f52b9ecc49d1a126244804ba106fa9
/frameworks/base/libs/hwui/PathCache.cpp
dee66b6d99dec8bc97843542d5388e50ebd0f6ee 20-Apr-2015 Chris Craik <ccraik@google.com> Simplify TaskManager fallback path

Change-Id: Ie3833449f7fe6aa69b9f71eb8bab1bef0fe434aa
/frameworks/base/libs/hwui/PathCache.cpp
e2bb380bc26749782c873e5488cfdf4e42b27346 13-Mar-2015 Chris Craik <ccraik@google.com> Use glops for text rendering

Change-Id: I5e155c8baf3149f0ff231ec3c89dbff6bb8eae92
/frameworks/base/libs/hwui/PathCache.cpp
ee248599d49a15fc207c5aeb0b90ec263cc1d600 12-Feb-2015 Derek Sollenberger <djsollen@google.com> Refactor DisplayList path caching.

This removes dependence on SkPath ptrs that HWUI does not control
the lifecycle of. This clears up some errors where the paths are
not generated from Java, but rather the Skia test suites.

Cherry-pick of a change that originally landed in master-skia and is
dependent on a skia merge (ag/655422).

Change-Id: I41b9797a2b0af5d6b4ea51891565469d4f1d832d
/frameworks/base/libs/hwui/PathCache.cpp
3f5175fccd39c341064e8bd86cb03dba4bc6881c 04-Feb-2015 John Reck <jreck@google.com> resolved conflicts for merge of c7e6b93a to master

Change-Id: I4b791f37193727a0306214645f2f98cdf218cad0
c7e6b93aba9dce93aacb05b5d9f59d09eddb0329 04-Feb-2015 John Reck <jreck@google.com> am af6eaf65: Merge "Fix ANR caused by hwuiTask thread" automerge: 5ad36d4

* commit 'af6eaf656ec0de5fcbea03968daffe2c845e2089':
Fix ANR caused by hwuiTask thread
44eb2c00861098dd3e2950d923646814b4cc57c2 29-Jan-2015 Chris Craik <ccraik@google.com> Refactor blending and texture gl state

Change-Id: Ia6b3c8b2afd3dfcee7f3ce401d846b789612054a
/frameworks/base/libs/hwui/PathCache.cpp
96a5c4c7bab6718524de7253da8309143ab48bef 28-Jan-2015 Chris Craik <ccraik@google.com> Move more GL state management to RenderState and its directory

Change-Id: Ic68584e1c08dc64be2ad43450cb6caa1de834fdc
/frameworks/base/libs/hwui/PathCache.cpp
c3c58e015fa30a0ad87d4af2b95b7071baa8ffe4 12-Jan-2015 Sangkyu Lee <sk82.lee@lge.com> Fix ANR caused by hwuiTask thread

If hwuiTask thread is exited while HWUI renders something,
some tasks can remain unfinished forever.
This can make ANR problem if RenderThread waits this kind of tasks.

According to the current implementation, hwuiTask threads are
exited when HWUI receives trimMemory() callback with level >= 20
and some applications such as SystemUI can receive trimMemory()
with level >= 20 even though they renders something yet.
(For instance, when RecentsActivity in SystemUI is finished,
HWUI receives trimMemory() callback with level >= 20
but SystemUI should still render the status bar and navigation bar.)

This patch prevents the tasks from remaining unfinished and
make the tasks executed immediately if they cannot be added
to their TaskProcessors.

Change-Id: I5bd26439aa5f183b1a7c1ce466362e27554b4d16
/frameworks/base/libs/hwui/PathCache.cpp
d41c4d8c732095ae99c955b6b82f7306633004b1 06-Jan-2015 Chris Craik <ccraik@google.com> Add overrides and switch to nullptr keyword for all files

Adds remaining missing overrides and nullptr usages, missed due to
an extreme failure in tool usage.

Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
/frameworks/base/libs/hwui/PathCache.cpp
f088c349dfea985e561d7e838ecd41be5168cd4a 12-Dec-2014 John Reck <jreck@google.com> Fix style

Change-Id: I7227b0eac126bf470ed50249a7809b845872983b
/frameworks/base/libs/hwui/PathCache.cpp
64bb413a664001c95c8439cf097dc3033f4ed733 22-Nov-2014 Andreas Gampe <agampe@google.com> Revert "resolved conflicts for merge of 220c3f4f to master"

Reverted as hwui doesn't agree.

This reverts commit 8a902d9f24e83c87b054adb5836b4a5b8a257be9.

Change-Id: I109e7b02bee2921e2155ded6df36f52e6f574b5a
/frameworks/base/libs/hwui/PathCache.cpp
8b59a528b54279ce640b2d23a00acae1d0f477c5 22-Nov-2014 John Reck <jreck@android.com> Revert "Frameworks/base: Unused parameters in hwui"

This reverts commit 42ddc18d108f789705ad4eb697ce9599ad322507.

Change-Id: I3574a936a39a96314db6437d0a1eb58d260d893d
/frameworks/base/libs/hwui/PathCache.cpp
2ab8298dc37851aab4623ba3f98d71055d653a73 21-Nov-2014 Andreas Gampe <agampe@google.com> resolved conflicts for merge of 99377df1 to lmp-mr1-dev-plus-aosp

Change-Id: I3a98f55832ac447b1ed0dd129c7a93d088025943
42ddc18d108f789705ad4eb697ce9599ad322507 21-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Unused parameters in hwui

Remove Clang cutout for unused parameters. Fix warnings.

Remove Clang cutout for deprecated Skia function usage. Has been
fixed in the L push.

Change-Id: I7ea073ff67127cc1e14e798b655e2c50615fe8e7
/frameworks/base/libs/hwui/PathCache.cpp
f2235b6a48db2e16b52711570bf2a0d0cb0b0d90 21-Nov-2014 Chris Craik <ccraik@google.com> resolve merge conflicts of 57b641a to lmp-mr1-dev-plus-aosp.

Change-Id: I1be708f5a0cd4d64021a57f1063d54330f1d2d7e
70850ea258cbf91477efa57a1f1a23cc0044cc93 18-Nov-2014 Chris Craik <ccraik@google.com> Improve logging around performance critical events

bug:17702227

Add details useful to developers (such as layer size/View name), and
switch away from logging implementation names/details, since they
are generally not relevant to developers.

Change-Id: Iee605d182f241450f7e75a6d0c283d51fa1312f5
/frameworks/base/libs/hwui/PathCache.cpp
1e19674107e1aa2224c2b8c7d12bfa057efe80ea 11-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Wall Werror in libs/hwui

Turn on -Wall -Werror in libs/hwui. Fix errors.

Change-Id: I74962d08c889712dacbd0d86d6760fc10802b6bd
/frameworks/base/libs/hwui/PathCache.cpp
98d608dba6a0b3c15fb08f1fa2c8b9d170124c7c 17-Jul-2014 Chris Craik <ccraik@google.com> Minor cleanups around color usage

Change-Id: I56733cbe933a58d5977c032f056abb35265ee252
/frameworks/base/libs/hwui/PathCache.cpp
906d47fd2bcedb9674b5765d01bd9c758069074c 28-Jun-2014 Chris Craik <ccraik@google.com> Deep copy SkPath parameter to PathCache task

bug:15440706
Change-Id: I2b5b25f620df838cb1155cc8502d86ad3644c212
/frameworks/base/libs/hwui/PathCache.cpp
b933055cf3f7f8ea89bfd3bc9c37a3891ff7310a 16-Jun-2014 Mike Reed <reed@google.com> stop using (deprecated) SkBitmap::Config

Change-Id: Ic75b5fc6996578e9d95bd3a220439ec1541d7c3b
/frameworks/base/libs/hwui/PathCache.cpp
1e5cf9aced40e6e14262e542d0ed0e24cda877a0 10-Jun-2014 Chris Craik <ccraik@google.com> am b1c76a1a: Merge "Tessellate on worker threads" into lmp-preview-dev

* commit 'b1c76a1abcfb2f33e12fef37ec71d20724863b5e':
Tessellate on worker threads
05f3d6e5111fd08df5cd9aae2c3d28399dc0e7f5 03-Jun-2014 Chris Craik <ccraik@google.com> Tessellate on worker threads

Tessellate and cache (where possible) shadow and round rect
tessellation tasks.

Change-Id: I2cfda8e11d83d51ea74af871235cf26e8f831d40
/frameworks/base/libs/hwui/PathCache.cpp
25e40de45f89490f03ca010a88d2265d9c901493 30-May-2014 Kenny Root <kroot@google.com> resolved conflicts for merge of b68f5f09 to master

Change-Id: Ib8dd3a353f40a3357c8dc5ac591cd5e3ab4d0a4b
7061f7d7910fdf1189ea7bf1398f6cf8b9bd0104 27-May-2014 yuyang <yuyang@codeaurora.org> Fix a resource race bug in PathCache

When enabled defer rendering, it will do precache for DrawPathOp.
The paint used for creating PathTask in precache just get the address
of mFilteredPaint of OpenGLRenderer. So for the following defer
operation like DrawTextOp has possibility change the mFilteredPaint
by getPaint while another WorkerThread in PathCache is using the paint
which pointed to the same address of mFilteredPaint to generate bitmap.
As a result, it will generate a wrong bitmap for generateTexture in
PathCache. To fix it, do a copy of paint when creating PathTask.

CRs-Fixed: 664244

Change-Id: I5516f5b143458b88d3573d15b7ebb34f688800c7
/frameworks/base/libs/hwui/PathCache.cpp
300bdfa13dd903c9335c11838cc0a604d0f8f2e6 26-Feb-2014 Chris Craik <ccraik@android.com> am 328b7ee6: am aecb8c43: am 7b4cce68: am c3bac8a0: Merge "Fix graphics corruption caused by HWUI caches"

* commit '328b7ee6a2ba2dc8f162fa57dbafd4bfc89bb72e':
Fix graphics corruption caused by HWUI caches
36fad8f6fcfbc2087b910600ed5a6f9741177d00 09-Jan-2014 Sangkyu Lee <sk82.lee@lge.com> Fix graphics corruption caused by HWUI caches

Some caches(PatchCache, TextureCache, PathCache) for HWUI
uses deferred removal for their cache entries even though
actual resource objects are immediately freed by
ResourceCache.
For this reason, the uniqueness of a resource address in
the caches is not guaranteed in specific cases.
(Because malloc() can return the same address when malloc()
and free() called very frequently.)

So it can be possible the cache have two cache entries for
two different resources but the same memory address.
(Of course one of the resources is already freed.)
It also can be possible mGarbage vector in PatchCache has
duplicated addresses and this can lead to duplicated free
blocks in the free block list and graphics corruption.
(Deferred removal was implmeneted based on an assumption of
unique resource addresses.)

So this patch makes sure resource objects are freed after
the resources are removed from the caches to guarantee
the uniqueness of a resource address and prevent graphics
corruption.

Change-Id: I040f033a4fc783d2c4bc04b113589657c36fb15b
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
/frameworks/base/libs/hwui/PathCache.cpp
d218a92c0afb8c0d98135b20b52ac87236e1c935 03-Jan-2014 Chris Craik <ccraik@google.com> Use const where possible for drawing parameters

They should never be modified by a Renderer, only read and copied.

Change-Id: I9d8d55dca19115ee9dfeb2bb3f092ba2fb327cd4
/frameworks/base/libs/hwui/PathCache.cpp
5d923200846ed59e813373bde789d97d4ccc40b5 22-Aug-2013 Romain Guy <romainguy@google.com> Second attempt at avoiding infinite loop in PathCache::trim()
Bug #10347089

Change-Id: I70f5a3933e848632473acc6636c88be5dc6ac430
/frameworks/base/libs/hwui/PathCache.cpp
0a8c51b1d0d66d6060afcec1eab33091d49332ae 22-Aug-2013 Romain Guy <romainguy@google.com> Properly account for created paths in the cache

Change-Id: I47b89b3085cefab6daac9194e7bfd3c140b37fa2
/frameworks/base/libs/hwui/PathCache.cpp
e3b0a0117a2ab4118f868a731b238fe8f2430276 27-Jun-2013 Romain Guy <romainguy@google.com> Refcount 9-patches and properly handle GC events

This change adds refcounting of Res_png_9patch instances, the native
data structure used to represent 9-patches. The Dalvik NinePatch class
now holds a native pointer instead of a Dalvik byte[]. This pointer
is used whenever we need to draw the 9-patch (software or hardware.)

Since we are now tracking garbage collection of NinePatch objects
libhwui's PatchCache must keep a list of free blocks in the VBO
used to store the meshes.

This change also removes unnecessary instances tracking from
GLES20DisplayList. Bitmaps and 9-patches are refcounted at the
native level and do not need to be tracked by the Dalvik layer.

Change-Id: Ib8682d573a538aaf1945f8ec5a9bd5da5d16f74b
/frameworks/base/libs/hwui/PathCache.cpp
be1b127c7bec252e0c6ab0e06ed6babed07d496f 06-Jun-2013 Romain Guy <romainguy@google.com> Assume a texture is unbound after deleting it
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
/frameworks/base/libs/hwui/PathCache.cpp
8aa195d7081b889f3a7b1f426cbd8556377aae5e 05-Jun-2013 Romain Guy <romainguy@google.com> Introduce Caches::bindTexture() to reduce glBindTexture calls

Change-Id: Ic345422567c020c0a9035ff51dcf2ae2a1fc59f4
/frameworks/base/libs/hwui/PathCache.cpp
4500a8d5d7fbec9dba5e693212da160849e401ff 27-Mar-2013 Romain Guy <romainguy@google.com> Path precaching creates duplicate cache entries
Bug #8478275

Change-Id: Ib541ea051e42e01cc0d277790e9c09de38ef72ee
/frameworks/base/libs/hwui/PathCache.cpp
c5cbee7d78513527e89450e6369a30a04b2d5e7a 21-Mar-2013 Romain Guy <romainguy@google.com> Stop worker threads on memory trim & fix bad pointer access

Change-Id: I6fe7e31aeb6dd41fa65ab952caed97bc2da510d7
/frameworks/base/libs/hwui/PathCache.cpp
c46d07a29e94807e768f8b162ce9f77a88ba6f46 16-Mar-2013 Romain Guy <romainguy@google.com> Merge all shapes/paths caches to PathCache

This change will greatly simplify the multi-threading of all
shape types.

This change also uses PathTessellator to render convex paths.

Change-Id: I4e65bc95c9d24ecae2183b72204de5c2dfb6ada4
/frameworks/base/libs/hwui/PathCache.cpp
0f809f3b794174f044366bf421f8d0c72d9afc14 13-Mar-2013 Romain Guy <romainguy@google.com> Prevent infinite loop when trimming the path cache

Change-Id: I04b5fa498336068f997c68d8613b35a99f67adbe
/frameworks/base/libs/hwui/PathCache.cpp
5dc7fa709646799a5207a5d217f70aa02bf4a3aa 12-Mar-2013 Romain Guy <romainguy@google.com> Add TaskManager API

This API can be used to run arbitrary tasks on a pool of worker
threads. The number of threads is calculated based on the number
of CPU cores available.

The API is made of 3 classes:

TaskManager
Creates and manages the worker threads.

Task
Describes the work to be done and the type of the output.
A task contains a future used to wait for the worker thread
to be done computing the result of the task.

TaskProcessor
The processor dispatches tasks to the TaskManager and is
responsible for performing the computation required by
each task. A processor will only be asked to process tasks
sent to the manager through the processor.

A typical use case:

class MyTask: Task<MyType>

class MyProcessor: TaskProcessor<MyType>

TaskManager m = new TaskManager();
MyProcessor p = new MyProcessor(m);
MyTask t = new MyTask();
p.add(t);

// Waits until the result is available
MyType result = t->getResult();

Change-Id: I1fe845ba4c49bb0e1b0627ab147f9a861c8e0749
/frameworks/base/libs/hwui/PathCache.cpp
ca89e2a68703bd428e8b66547d033a6ed35b3595 09-Mar-2013 Romain Guy <romainguy@google.com> Precache paths from a worker thread

Change-Id: I3e7b53d67e0e03e403beaf55c39350ead7f1e309
/frameworks/base/libs/hwui/PathCache.cpp
e3a9b24b5e3f9b2058486814a6d27729e51ad466 08-Jan-2013 Romain Guy <romainguy@google.com> Add plumbing for better text scaling

Fonts are now described by a transform matrix. This lead to switching
from a vector to a hashmap. This change therefore adds new comparators
and hash computations to Font.

Change-Id: I2daffa7d6287c18554c606b8bfa06640d28b4530
/frameworks/base/libs/hwui/PathCache.cpp
059e12ccd20f5c249724a8362d6bac325334ea76 29-Nov-2012 Romain Guy <romainguy@google.com> Use LruCache instead of GenerationCache in libhwui

Change-Id: Ic26ddc7151eb5462bcd243b21daf7187ed6d3bec
/frameworks/base/libs/hwui/PathCache.cpp
fdd6fc1beb5076a630c7066b8b1731995636c09f 27-Apr-2012 Romain Guy <romainguy@google.com> Work-around for a Skia rasterization bug
Bug #6411457

Skia does not generates the bottom right pixel of a rect when
drawing a rect as an SkPath into an alpha8 bitmap.

Change-Id: Ifb5286ae67745c9e44ee387b6d6ad607a9a2e6ce
/frameworks/base/libs/hwui/PathCache.cpp
4bcb7467a174ed03a67b0c62950c555813ddf00d 24-Feb-2012 Romain Guy <romainguy@google.com> Only recreate path textures when necessary

When a drawPath command is recorded in a display list, a copy of the
source path is made to preserve against possible modifications of the
said source path. Copies are discarded when a display list is cleared,
which usually happens on invalidate(). This means that even if a path
is never modified, the texture generated to draw it on screen is
destroyed every time an invalidate() is issued. This change fixes this
problem by introducing a reference to the source path in the copy.
If both the copy and the source path have the same genID, they are
the same path and can share the same texture.

Change-Id: I34849311c183e06336a1391d2d1568a087f973f6
/frameworks/base/libs/hwui/PathCache.cpp
33f6beb10f98e8ba96250e284876d607055d278d 17-Feb-2012 Romain Guy <romainguy@google.com> Record possible clip rejects when recording display lists

This optimization allows us to quickly skip operations that lie
entirely outside of the known bounds of a display list. Because
of ViewGroup.setClipChildren, we must keep the operations recorded
in the display list. setClipChildren(false) is however a very
uncommon operation and we will therefore often benefit from this
new optimization.

Change-Id: I0942c864e55298e6dccd9977d15adefbce3ba3ad
/frameworks/base/libs/hwui/PathCache.cpp
d9e688cab3015d858110fb8240cf7378c6befd82 12-Nov-2011 Jeff Brown <jeffbrown@google.com> Clean up GenerationCache.

Use const references to keys and values where appropriate to avoid
copying them unnecessarily.

Deleted some dead code.

Simplified a few pieces that were doing unnecessary redundant work.

Change-Id: Ib2145b7094a40db2d679e05dafe050fe1e87b846
/frameworks/base/libs/hwui/PathCache.cpp
7b8b75892400745f39bb8d5b5d539091bcfb1e1e 25-Feb-2011 Romain Guy <romainguy@google.com> Remove the right entries from the cache when a GC happens.

Change-Id: I4649b18c4721a5511a404299e771e675c843407b
/frameworks/base/libs/hwui/PathCache.cpp
2fc941e4650d618ff6e122f28b616d9032ffa134 04-Feb-2011 Romain Guy <romainguy@google.com> Fixes cache misses and extra allocations.
Bug #3421454

Change-Id: If4d5c960a7e4c581a9d213073e658284b4e1c497
/frameworks/base/libs/hwui/PathCache.cpp
ff26a0c1c905dc1ec53b1bab860b80f2976d59be 20-Jan-2011 Romain Guy <romainguy@google.com> Remove unnecessary code.

Change-Id: I83eba3406c26a4028af08b4d4c95ecd02803e75a
/frameworks/base/libs/hwui/PathCache.cpp
32228288a957f3823df92365bc709ad6f42b012e 12-Jan-2011 Romain Guy <romainguy@google.com> Solve translucency issue when drawing paths.

Change-Id: I68ae0e2ccddaca2f76b5b2dd3e3cf1277fddaad6
/frameworks/base/libs/hwui/PathCache.cpp
fe48f65922d4a3cc4aefe058cee5acec51504a20 12-Nov-2010 Romain Guy <romainguy@google.com> Free resources only from the GL context thread.
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
/frameworks/base/libs/hwui/PathCache.cpp
e190aa69756aecfaffabdd4c6d32cb6b3220d842 11-Nov-2010 Romain Guy <romainguy@google.com> Add new runtime debug flags.

Change-Id: I07955de166a89b5053c6c13f250bb3e2936ca86e
/frameworks/base/libs/hwui/PathCache.cpp
9e10841c27d973b930e1b49a099c69d866659505 09-Nov-2010 Romain Guy <romainguy@google.com> Correctly remove unused paths from the cache.

Change-Id: I41d9334dcd9871634037344ab49bf69383498161
/frameworks/base/libs/hwui/PathCache.cpp
1041aded2df45094c36831028245fb7c5e9b67b7 04-Nov-2010 Romain Guy <romainguy@google.com> Fix possible rendering issue when drawing a path.

Change-Id: I25f2e609589f0dd9294bcf7930de6398c0d7e377
/frameworks/base/libs/hwui/PathCache.cpp
d79991277043d6bdbd90bb63fd8aff73ef9e06a5 01-Oct-2010 Romain Guy <romainguy@google.com> Make simple paths made of lines work.

Bug #3041098

Change-Id: Ife9c3f01ded10e2bb35b1cdf1a54734d8347fee4
/frameworks/base/libs/hwui/PathCache.cpp
183f17e7eb2f51be24489e7b1bd3e2e5e4bc579a 09-Sep-2010 Romain Guy <romainguy@google.com> A Path can exist in several cache entries.

Change-Id: I742f7425d2b6bef753ed3e04fb39ebb103b2dc00
/frameworks/base/libs/hwui/PathCache.cpp
a2341a9f6addcd79723965ec5b1a1c5ae0f8bd65 09-Sep-2010 Romain Guy <romainguy@google.com> Purge Skia objects from GL caches as needed.

Change-Id: I754c671cf790ad5ae8bf047ad328034217da4ecc
/frameworks/base/libs/hwui/PathCache.cpp
fb8b763f762ae21923c58d64caa729b012f40e05 24-Aug-2010 Romain Guy <romainguy@google.com> Use only one GL context per process, share chaches.

Change-Id: Ieabaa25338d2f4b8d4fd90e7401ad6e7452eae11
/frameworks/base/libs/hwui/PathCache.cpp
1e45aae5de003657e5d18f74d34998f5de5db5b7 14-Aug-2010 Romain Guy <romainguy@google.com> Add drop shadows.

Change-Id: Ic6a72409d4785968d1fbdff229f17ee5c00b240b
/frameworks/base/libs/hwui/PathCache.cpp
61c8c9c5b2006d18e9310b6521c65b36ffe75ce4 10-Aug-2010 Romain Guy <romainguy@google.com> Fix tons of bugs and add new text rendering support.

Change-Id: I326c66b10784006f6df2f12d38e120cef94cd0d7
/frameworks/base/libs/hwui/PathCache.cpp
9cccc2b9bdd4850a3f9679569aaec3ab98477a5d 08-Aug-2010 Romain Guy <romainguy@android.com> Enforce maximum texture size.

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
/frameworks/base/libs/hwui/PathCache.cpp
22158e139a3d6c6a9787ca0de224e9368f643284 06-Aug-2010 Romain Guy <romainguy@google.com> Automatically cleanup textures that don't fit in the cache.

Change-Id: I4f29ed96ea11118b391fb957e1e4d1b8fcef1537
/frameworks/base/libs/hwui/PathCache.cpp
7fbcc0492fca03857e3c45064f4aa040af817d55 05-Aug-2010 Romain Guy <romainguy@google.com> Add support for paths.

Rendering is implementing by rasterizing the paths into A8 textures.
This cna be extremely inefficient if the path changes often.

Change-Id: I609343f304ae38e0d319359403ee73b9b5b3c93a
/frameworks/base/libs/hwui/PathCache.cpp