second take, hopefully this time it doesn't break one of the builds: "SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything."
diff --git a/libs/surfaceflinger/Layer.h b/libs/surfaceflinger/Layer.h
index 4c13d6e..add5d50 100644
--- a/libs/surfaceflinger/Layer.h
+++ b/libs/surfaceflinger/Layer.h
@@ -101,7 +101,7 @@
status_t resize(int32_t index, uint32_t w, uint32_t h, const char* what);
Region post(uint32_t* oldState, bool& recomputeVisibleRegions);
- sp<SurfaceBuffer> peekBuffer();
+ sp<SurfaceBuffer> peekBuffer(int usage);
void destroy();
void scheduleBroadcast();
@@ -114,7 +114,7 @@
~SurfaceLayer();
private:
- virtual sp<SurfaceBuffer> getBuffer();
+ virtual sp<SurfaceBuffer> getBuffer(int usage);
sp<Layer> getOwner() const {
return static_cast<Layer*>(Surface::getOwner().get());