Revert "Delete HWC1"
This reverts commit 90f923493fa053655a203c34ea491086aeb07602.
Change-Id: If9da49e3bc85f8ff21ac1bd22a6bab97e9aa3103
diff --git a/services/surfaceflinger/DisplayHardware/FramebufferSurface.h b/services/surfaceflinger/DisplayHardware/FramebufferSurface.h
index eb70479..439435a 100644
--- a/services/surfaceflinger/DisplayHardware/FramebufferSurface.h
+++ b/services/surfaceflinger/DisplayHardware/FramebufferSurface.h
@@ -41,6 +41,9 @@
virtual status_t beginFrame(bool mustRecompose);
virtual status_t prepareFrame(CompositionType compositionType);
+#ifndef USE_HWC2
+ virtual status_t compositionComplete();
+#endif
virtual status_t advanceFrame();
virtual void onFrameCommitted();
virtual void dumpAsString(String8& result) const;
@@ -54,6 +57,9 @@
private:
virtual ~FramebufferSurface() { }; // this class cannot be overloaded
+#ifndef USE_HWC2
+ virtual void onFrameAvailable(const BufferItem& item);
+#endif
virtual void freeBufferLocked(int slotIndex);
virtual void dumpLocked(String8& result, const char* prefix) const;
@@ -61,8 +67,12 @@
// nextBuffer waits for and then latches the next buffer from the
// BufferQueue and releases the previously latched buffer to the
// BufferQueue. The new buffer is returned in the 'buffer' argument.
+#ifdef USE_HWC2
status_t nextBuffer(sp<GraphicBuffer>& outBuffer, sp<Fence>& outFence,
android_dataspace_t& outDataspace);
+#else
+ status_t nextBuffer(sp<GraphicBuffer>& outBuffer, sp<Fence>& outFence);
+#endif
// mDisplayType must match one of the HWC display types
int mDisplayType;
@@ -82,10 +92,12 @@
// Hardware composer, owned by SurfaceFlinger.
HWComposer& mHwc;
+#ifdef USE_HWC2
// Previous buffer to release after getting an updated retire fence
bool mHasPendingRelease;
int mPreviousBufferSlot;
sp<GraphicBuffer> mPreviousBuffer;
+#endif
};
// ---------------------------------------------------------------------------