修訂 | d39fa8735a1299f95ab3199bffa87dbe7f03eab7 (tree) |
---|---|
時間 | 2011-11-07 10:45:27 |
作者 | Chia-I Wu <olvaffe@gmai...> |
Commiter | Chih-Wei Huang |
android: fix build with honeycomb
@@ -33,7 +33,6 @@ | ||
33 | 33 | #include "state_tracker/sw_winsys.h" |
34 | 34 | |
35 | 35 | #include <utils/Errors.h> |
36 | -#include <private/ui/sw_gralloc_handle.h> | |
37 | 36 | |
38 | 37 | #include <hardware/gralloc.h> |
39 | 38 |
@@ -106,13 +105,8 @@ android_displaytarget_unmap(struct sw_winsys *ws, | ||
106 | 105 | struct android_sw_displaytarget *adt = android_sw_displaytarget(dt); |
107 | 106 | |
108 | 107 | if (adt->mapped) { |
109 | - if (sw_gralloc_handle_t::validate(adt->handle) >= 0) { | |
110 | - adt->mapped = NULL; | |
111 | - } | |
112 | - else { | |
113 | - droid->grmod->unlock(droid->grmod, adt->handle); | |
114 | - adt->mapped = NULL; | |
115 | - } | |
108 | + droid->grmod->unlock(droid->grmod, adt->handle); | |
109 | + adt->mapped = NULL; | |
116 | 110 | } |
117 | 111 | } |
118 | 112 |
@@ -125,16 +119,9 @@ android_displaytarget_map(struct sw_winsys *ws, | ||
125 | 119 | struct android_sw_displaytarget *adt = android_sw_displaytarget(dt); |
126 | 120 | |
127 | 121 | if (!adt->mapped) { |
128 | - if (sw_gralloc_handle_t::validate(adt->handle) >= 0) { | |
129 | - const sw_gralloc_handle_t *swhandle = | |
130 | - reinterpret_cast<const sw_gralloc_handle_t *>(adt->handle); | |
131 | - adt->mapped = reinterpret_cast<void *>(swhandle->base); | |
132 | - } | |
133 | - else { | |
134 | - /* lock the buffer for CPU access */ | |
135 | - droid->grmod->lock(droid->grmod, adt->handle, | |
136 | - adt->usage, 0, 0, adt->width, adt->height, &adt->mapped); | |
137 | - } | |
122 | + /* lock the buffer for CPU access */ | |
123 | + droid->grmod->lock(droid->grmod, adt->handle, | |
124 | + adt->usage, 0, 0, adt->width, adt->height, &adt->mapped); | |
138 | 125 | } |
139 | 126 | |
140 | 127 | return adt->mapped; |