[3171580] SurfaceFlinger Bypass mode. (DO NOT MERGE)
This is a poor's man precursor to the h/w composer HAL.
Basically we detect when a window is full screen and in
that case we bypass surfaceflinger's composition step, which
yields to much improved performance.
Change-Id: Ie03796ae81a1c951949b771c9323044b980cb347
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index a93fcb1..9ff5716 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -81,6 +81,10 @@
virtual sp<Surface> createSurface() const;
virtual status_t ditch();
virtual void onRemoved();
+ virtual bool setBypass(bool enable);
+
+ inline sp<GraphicBuffer> getBypassBuffer() const {
+ return mBufferManager.getActiveBuffer(); }
// only for debugging
inline sp<GraphicBuffer> getBuffer(int i) const {
@@ -232,6 +236,7 @@
uint32_t mReqFormat;
bool mNeedsScaling;
bool mFixedSize;
+ bool mBypassState;
};
// ---------------------------------------------------------------------------