diff options
author | John Reck <jreck@google.com> | 2014-01-03 18:09:17 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2014-01-27 16:40:39 -0800 |
commit | 4f02bf4eef6af47f35c70c4dda5b7b9523d89ca0 (patch) | |
tree | 59140e036199cbd7a12886e1a2500cb69c8bbdda /libs/hwui/renderthread/RenderThread.h | |
parent | 8435cf0d8b9e24715d5b310ed569fda918dcaa46 (diff) |
Native-side proxy
Remove RemoteGLRenderer
Remove reflection-based control
Change-Id: If17c2bbb61c7141986d88c4763def77ed1074985
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.h')
-rw-r--r-- | libs/hwui/renderthread/RenderThread.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/libs/hwui/renderthread/RenderThread.h b/libs/hwui/renderthread/RenderThread.h index 4edd5758ca13..e444aa0605e7 100644 --- a/libs/hwui/renderthread/RenderThread.h +++ b/libs/hwui/renderthread/RenderThread.h @@ -28,11 +28,27 @@ namespace android { namespace uirenderer { namespace renderthread { +class TaskQueue { +public: + TaskQueue(); + + RenderTask* next(); + void queue(RenderTask* task); + RenderTask* peek(); + void remove(RenderTask* task); + +private: + RenderTask* mHead; + RenderTask* mTail; +}; + class ANDROID_API RenderThread : public Thread, public Singleton<RenderThread> { public: // RenderThread takes complete ownership of tasks that are queued // and will delete them after they are run ANDROID_API void queue(RenderTask* task); + void queueDelayed(RenderTask* task, int delayMs); + void remove(RenderTask* task); protected: virtual bool threadLoop(); @@ -43,13 +59,16 @@ private: RenderThread(); virtual ~RenderThread(); - RenderTask* nextTask(); + // Returns the next task to be run. If this returns NULL nextWakeup is set + // to the time to requery for the nextTask to run. mNextWakeup is also + // set to this time + RenderTask* nextTask(nsecs_t* nextWakeup); sp<Looper> mLooper; Mutex mLock; - RenderTask* mQueueHead; - RenderTask* mQueueTail; + nsecs_t mNextWakeup; + TaskQueue mQueue; }; } /* namespace renderthread */ |