History log of /frameworks/base/libs/hwui/thread/TaskProcessor.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
faecb78a6b11c780db47bc940ca7662899ab5d5e 21-Jul-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings in frameworks/base

* Add explicit keyword to conversion constructors.
* Add NOLINT to implicit conversion constructors.

Bug: 28341362
Test: build with clang-tidy
Change-Id: Ie4d37072ab57d1662d18db4de1c8577247f43337
/frameworks/base/libs/hwui/thread/TaskProcessor.h
dee66b6d99dec8bc97843542d5388e50ebd0f6ee 20-Apr-2015 Chris Craik <ccraik@google.com> Simplify TaskManager fallback path

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

Change-Id: I4b791f37193727a0306214645f2f98cdf218cad0
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/thread/TaskProcessor.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/thread/TaskProcessor.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/thread/TaskProcessor.h