OSDN Git Service
(root)
/
android-x86
/
hardware-libhardware.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfc010a
)
fix [1965730] Device always give force close screen and completely unusable in Éclair...
author
Mathias Agopian
<mathias@google.com>
Tue, 7 Jul 2009 23:30:42 +0000
(16:30 -0700)
committer
Mathias Agopian
<mathias@google.com>
Tue, 7 Jul 2009 23:30:42 +0000
(16:30 -0700)
modules/gralloc/gralloc.cpp
patch
|
blob
|
history
diff --git
a/modules/gralloc/gralloc.cpp
b/modules/gralloc/gralloc.cpp
index
257bb4a
..
40d14dc
100644
(file)
--- a/
modules/gralloc/gralloc.cpp
+++ b/
modules/gralloc/gralloc.cpp
@@
-200,10
+200,16
@@
static int init_pmem_area(private_module_t* m)
pthread_mutex_lock(&m->lock);
int err = m->pmem_master;
if (err == -1) {
+ // first time, try to initialize pmem
err = init_pmem_area_locked(m);
if (err) {
m->pmem_master = err;
}
+ } else if (err < 0) {
+ // pmem couldn't be initialized, never use it
+ } else {
+ // pmem OK
+ err = 0;
}
pthread_mutex_unlock(&m->lock);
return err;