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
|