summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/Layer.h
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2012-01-31 18:24:27 -0800
committerMathias Agopian <mathias@google.com>2012-02-01 20:43:06 -0800
commit99ce5cdeb383216dee95af4d90e47406b0948ea1 (patch)
tree4f96f44e8e55a6c72b4e640704868f23a5e7c72b /services/surfaceflinger/Layer.h
parent93bfeedd3768e25c783e22ed88103c2c409894a4 (diff)
downloadframeworks_native-99ce5cdeb383216dee95af4d90e47406b0948ea1.zip
frameworks_native-99ce5cdeb383216dee95af4d90e47406b0948ea1.tar.gz
frameworks_native-99ce5cdeb383216dee95af4d90e47406b0948ea1.tar.bz2
separate transactions from updates
with this changes, SF transactions are handled as soon as possible but do not trigger updates. the update is delayed until the next vsync. this allows us to work much better without requiring triple-buffering. Change-Id: I1fa10794d0cf742129f0877698b7b1e1f2ec7401
Diffstat (limited to 'services/surfaceflinger/Layer.h')
-rw-r--r--services/surfaceflinger/Layer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 2dd4da1..bf30608 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -80,6 +80,7 @@ public:
virtual wp<IBinder> getSurfaceTextureBinder() const;
virtual void onLayerDisplayed();
+ virtual bool onPreComposition();
// only for debugging
inline const sp<GraphicBuffer>& getActiveBuffer() const { return mActiveBuffer; }
@@ -115,14 +116,17 @@ private:
uint32_t mCurrentTransform;
uint32_t mCurrentScalingMode;
bool mCurrentOpacity;
+ size_t mRefreshPending;
bool mFrameLatencyNeeded;
int mFrameLatencyOffset;
+
struct Statistics {
Statistics() : timestamp(0), set(0), vsync(0) { }
nsecs_t timestamp; // buffer timestamp
nsecs_t set; // buffer displayed timestamp
nsecs_t vsync; // vsync immediately before set
};
+
// protected by mLock
Statistics mFrameStats[128];