summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/DrawFrameTask.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/renderthread/DrawFrameTask.h')
-rw-r--r--libs/hwui/renderthread/DrawFrameTask.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/libs/hwui/renderthread/DrawFrameTask.h b/libs/hwui/renderthread/DrawFrameTask.h
index 83ecb98f548f..d8c43e0d8ca8 100644
--- a/libs/hwui/renderthread/DrawFrameTask.h
+++ b/libs/hwui/renderthread/DrawFrameTask.h
@@ -24,8 +24,8 @@
#include "RenderTask.h"
-#include "../Rect.h"
#include "../FrameInfo.h"
+#include "../Rect.h"
#include "../TreeInfo.h"
namespace android {
@@ -55,7 +55,7 @@ enum {
* tracked across many frames not just a single frame.
* It is the sync-state task, and will kick off the post-sync draw
*/
-class DrawFrameTask : public RenderTask {
+class DrawFrameTask {
public:
DrawFrameTask();
virtual ~DrawFrameTask();
@@ -72,7 +72,11 @@ public:
int64_t* frameInfo() { return mFrameInfo; }
- virtual void run() override;
+ void run();
+
+ void setFrameCallback(std::function<void(int64_t)>&& callback) {
+ mFrameCallback = std::move(callback);
+ }
private:
void postAndWait();
@@ -90,12 +94,14 @@ private:
/*********************************************
* Single frame data
*********************************************/
- std::vector< sp<DeferredLayerUpdater> > mLayers;
+ std::vector<sp<DeferredLayerUpdater> > mLayers;
int mSyncResult;
int64_t mSyncQueued;
int64_t mFrameInfo[UI_THREAD_FRAME_INFO_SIZE];
+
+ std::function<void(int64_t)> mFrameCallback;
};
} /* namespace renderthread */