summaryrefslogtreecommitdiff
path: root/modules/gralloc/framebuffer.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-12-14 18:27:09 -0800
committerMathias Agopian <mathias@google.com>2009-12-15 15:00:57 -0800
commitf96b2064d7753af7ab75f05eff9559f401e1a4ad (patch)
tree3f94f2204cf1b9f12762e83701a52fb0622358d4 /modules/gralloc/framebuffer.cpp
parent058c1fce990a54b1dfdfb511c752b32914d32f6f (diff)
remove all references to pmem and simplify the lock/unlock hooks
this gralloc module is only used on the emulator or without a h/w renderer. therefore there is no synchronization to do in lock/unlock and pmem buffers are not relevant. hopefully this will remove some of the confusion about how gralloc should be implemented and make it more obvious that this implementation is not intended to be used by h/w renderers.
Diffstat (limited to 'modules/gralloc/framebuffer.cpp')
-rw-r--r--modules/gralloc/framebuffer.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/modules/gralloc/framebuffer.cpp b/modules/gralloc/framebuffer.cpp
index 7d2b582f..01951034 100644
--- a/modules/gralloc/framebuffer.cpp
+++ b/modules/gralloc/framebuffer.cpp
@@ -92,18 +92,8 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer)
private_handle_t const* hnd = reinterpret_cast<private_handle_t const*>(buffer);
private_module_t* m = reinterpret_cast<private_module_t*>(
dev->common.module);
-
- if (m->currentBuffer) {
- m->base.unlock(&m->base, m->currentBuffer);
- m->currentBuffer = 0;
- }
if (hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) {
-
- m->base.lock(&m->base, buffer,
- private_module_t::PRIV_USAGE_LOCKED_FOR_POST,
- 0, 0, m->info.xres, m->info.yres, NULL);
-
const size_t offset = hnd->base - m->framebuffer->base;
m->info.activate = FB_ACTIVATE_VBL;
m->info.yoffset = offset / m->finfo.line_length;
@@ -292,8 +282,7 @@ int mapFrameBufferLocked(struct private_module_t* module)
int err;
size_t fbSize = roundUpToPageSize(finfo.line_length * info.yres_virtual);
- module->framebuffer = new private_handle_t(dup(fd), fbSize,
- private_handle_t::PRIV_FLAGS_USES_PMEM);
+ module->framebuffer = new private_handle_t(dup(fd), fbSize, 0);
module->numBuffers = info.yres_virtual / info.yres;
module->bufferMask = 0;