History log of /frameworks/base/libs/hwui/PathCache.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7224e2b624daea67b5653285c9640f170c096bdb 08-Apr-2016 sergeyv <sergeyv@google.com> Stop comparing Descriptions with memcmp

bug:27894959
Change-Id: I379c11381c08f6f77577a914638b32415768f26e
/frameworks/base/libs/hwui/PathCache.h
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.h
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.h
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.h
272a685f17cc4828257e521a6f62b7b17870f75e 30-Jul-2015 John Reck <jreck@google.com> Replace most usages of utils/Vector.h

Change-Id: I540d1b3523244d6c71fc52d6fb30555271c25644
/frameworks/base/libs/hwui/PathCache.h
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.h
e2bb380bc26749782c873e5488cfdf4e42b27346 13-Mar-2015 Chris Craik <ccraik@google.com> Use glops for text rendering

Change-Id: I5e155c8baf3149f0ff231ec3c89dbff6bb8eae92
/frameworks/base/libs/hwui/PathCache.h
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.h
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.h
e84a208317e0ed388fcdad1e6743c7849acb51b0 22-Dec-2014 Chris Craik <ccraik@google.com> Add overrides and switch to nullptr keyword

Changes generated with clang-modernize.

Additionally, fixed some struct-vs-class usage to make clang happy.

Change-Id: Ic6ef2427401ff1e794d26f21f7b44868fc75fb72
/frameworks/base/libs/hwui/PathCache.h
2dc236b2bae13b9a0ed9b3f7320502aecd7983b3 15-Oct-2014 Tom Hudson <tomhudson@google.com> Clean up physical coupling

Narrow the use of #include directives in hwui, replacing with forward
declarations where straightforward. Speeds compiles; doesn't do any
restructuring of code.

Change-Id: Icac2baffb5896f55d8c6718e9bd9d4bfa02d3ca0
/frameworks/base/libs/hwui/PathCache.h
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.h
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.h
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.h
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.h
564acf7c9bff822f608cda0d5df0a64a9f9aaefd 03-Jan-2014 Chris Craik <ccraik@google.com> Fix Clang warnings/errors

Fix several build warnings (struct != class, int != size_t) and errors
(variable leng non-POD arrays).

Change-Id: I70b4e784365514303d8954bfcb1f39d7c22c1321
/frameworks/base/libs/hwui/PathCache.h
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.h
8aa195d7081b889f3a7b1f426cbd8556377aae5e 05-Jun-2013 Romain Guy <romainguy@google.com> Introduce Caches::bindTexture() to reduce glBindTexture calls

Change-Id: Ic345422567c020c0a9035ff51dcf2ae2a1fc59f4
/frameworks/base/libs/hwui/PathCache.h
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.h
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.h
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.h
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.h
ca89e2a68703bd428e8b66547d033a6ed35b3595 09-Mar-2013 Romain Guy <romainguy@google.com> Precache paths from a worker thread

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

Change-Id: Ic26ddc7151eb5462bcd243b21daf7187ed6d3bec
/frameworks/base/libs/hwui/PathCache.h
e5df231434357424cea8d2b8d0cdf31253a98110 12-Aug-2011 Romain Guy <romainguy@google.com> Make sure we correctly copy caches keys.
Bug #5136067

Change-Id: I366e840bef44415436dc7b13d89cfb610feed663
/frameworks/base/libs/hwui/PathCache.h
b29cfbf768eab959b31410aafc0a99e20249e9d7 19-Mar-2011 Romain Guy <romainguy@google.com> Fix paths rendering issues.

See ApiDemos, PathEffect and PathFillTypes.

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

Change-Id: I83eba3406c26a4028af08b4d4c95ecd02803e75a
/frameworks/base/libs/hwui/PathCache.h
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.h
e190aa69756aecfaffabdd4c6d32cb6b3220d842 11-Nov-2010 Romain Guy <romainguy@google.com> Add new runtime debug flags.

Change-Id: I07955de166a89b5053c6c13f250bb3e2936ca86e
/frameworks/base/libs/hwui/PathCache.h
c15008e72ec00ca20a271c3006dac649fd07533b 10-Nov-2010 Romain Guy <romainguy@google.com> Move all debug flags in a single place.

This change also adds a new memory usage flag. When turned on, the
following is printed after every frame:

D/OpenGLRenderer( 3723): Current memory usage / total memory usage (bytes):
D/OpenGLRenderer( 3723): TextureCache 3766680 / 20971520
D/OpenGLRenderer( 3723): LayerCache 3538944 / 8388608
D/OpenGLRenderer( 3723): GradientCache 135168 / 524288
D/OpenGLRenderer( 3723): PathCache 41180 / 4194304
D/OpenGLRenderer( 3723): TextDropShadowCache 0 / 2097152
D/OpenGLRenderer( 3723): FontRenderer 0 262144 / 262144
D/OpenGLRenderer( 3723): FontRenderer 1 262144 / 262144
D/OpenGLRenderer( 3723): FontRenderer 2 262144 / 262144
D/OpenGLRenderer( 3723): Other:
D/OpenGLRenderer( 3723): FboCache 2 / 12
D/OpenGLRenderer( 3723): PatchCache 31 / 512
D/OpenGLRenderer( 3723): Total memory usage:
D/OpenGLRenderer( 3723): 8268404 bytes, 7.89 MB

This should help tracking possibe memory issues.

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

Change-Id: I41d9334dcd9871634037344ab49bf69383498161
/frameworks/base/libs/hwui/PathCache.h
5b3b35296e8b2c8d3f07d32bb645d5414db41a1d 28-Oct-2010 Romain Guy <romainguy@google.com> Optimize FBO drawing with regions.
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
/frameworks/base/libs/hwui/PathCache.h
2665b85b2bd08faabf7c520a622a0e4d3465245f 19-Oct-2010 Romain Guy <romainguy@google.com> Small cleanup.

Change-Id: I0e5b9154a2d93af793d62f462d68cb7c6c3f6d75
/frameworks/base/libs/hwui/PathCache.h
03750a067e818ca7fbd0f590e2ff6a8fded21e6c 18-Oct-2010 Romain Guy <romainguy@google.com> Use VBOs to render most geometries.

Change-Id: I4360dc4fe5693ab425450c107282b2c22db4dca7
/frameworks/base/libs/hwui/PathCache.h
4bb942083a0d4db746adf95349108dd8ef842e32 13-Oct-2010 Romain Guy <romainguy@google.com> Optimize 9patch rendering.

This change detects empty quads in 9patches and removes them from
the mesh to avoid unnecessary blending.

Change-Id: I4500566fb4cb6845d64dcb59b522c0be7a0ec704
/frameworks/base/libs/hwui/PathCache.h
21b028a44f3e0bd9b0f0432b8b92c45f661d22a4 09-Oct-2010 Romain Guy <romainguy@google.com> Move GenerationCache to the utils directory.

Change-Id: I210ffa8f1d76a102bb7d971c649c20a74d03fbe6
/frameworks/base/libs/hwui/PathCache.h
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.h
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.h
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.h
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.h
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.h