summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
authorFred Quintana <fredq@google.com>2009-08-11 20:49:35 -0700
committerFred Quintana <fredq@google.com>2009-08-11 20:49:35 -0700
commit64e89a8aff9a45a491f1d7064a655b9021fe644a (patch)
tree5cad5d20370d2d77335324e55551ce2a2fe8b903 /libs/surfaceflinger/Layer.cpp
parent50cb54ff5cdb233d01e1dd94b355cbfe0a371520 (diff)
downloadframeworks_base-64e89a8aff9a45a491f1d7064a655b9021fe644a.zip
frameworks_base-64e89a8aff9a45a491f1d7064a655b9021fe644a.tar.gz
frameworks_base-64e89a8aff9a45a491f1d7064a655b9021fe644a.tar.bz2
Revert "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."
This reverts commit 8b76a0ac6fbf07254629ed1ea86af014d5abe050.
Diffstat (limited to 'libs/surfaceflinger/Layer.cpp')
-rw-r--r--libs/surfaceflinger/Layer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/surfaceflinger/Layer.cpp b/libs/surfaceflinger/Layer.cpp
index 8c0b40d..d1142cc 100644
--- a/libs/surfaceflinger/Layer.cpp
+++ b/libs/surfaceflinger/Layer.cpp
@@ -217,7 +217,7 @@ void Layer::onDraw(const Region& clip) const
drawWithOpenGL(clip, mTextures[index]);
}
-sp<SurfaceBuffer> Layer::peekBuffer(int usage)
+sp<SurfaceBuffer> Layer::peekBuffer()
{
/*
* This is called from the client's Surface::lock(), after it locked
@@ -250,7 +250,7 @@ sp<SurfaceBuffer> Layer::peekBuffer(int usage)
}
LayerBitmap& layerBitmap(mBuffers[backBufferIndex]);
- sp<SurfaceBuffer> buffer = layerBitmap.allocate(usage);
+ sp<SurfaceBuffer> buffer = layerBitmap.allocate();
LOGD_IF(DEBUG_RESIZE,
"Layer::getBuffer(this=%p), index=%d, (%d,%d), (%d,%d)",
@@ -649,12 +649,12 @@ Layer::SurfaceLayer::~SurfaceLayer()
{
}
-sp<SurfaceBuffer> Layer::SurfaceLayer::getBuffer(int usage)
+sp<SurfaceBuffer> Layer::SurfaceLayer::getBuffer()
{
sp<SurfaceBuffer> buffer = 0;
sp<Layer> owner(getOwner());
if (owner != 0) {
- buffer = owner->peekBuffer(usage);
+ buffer = owner->peekBuffer();
}
return buffer;
}