summaryrefslogtreecommitdiffstats
path: root/opengl/system
diff options
context:
space:
mode:
authorAlex Vallée <avallee@chromium.org>2014-09-24 14:05:22 -0400
committerAlex Vallée <avallee@chromium.org>2014-09-24 14:05:22 -0400
commitfe2c5beb964d2e2aecedb02b9cca592e0811d90b (patch)
tree14d1af748b3b2930cf2dec65894c8d02f652fe4a /opengl/system
parent376688e76694bf5b8672379c540b1bda059da682 (diff)
downloadandroid_device_generic_goldfish-fe2c5beb964d2e2aecedb02b9cca592e0811d90b.tar.gz
android_device_generic_goldfish-fe2c5beb964d2e2aecedb02b9cca592e0811d90b.tar.bz2
android_device_generic_goldfish-fe2c5beb964d2e2aecedb02b9cca592e0811d90b.zip
Use more appropriate type in cb_handle_t::validate.
The interface specified by the HWC hal includes const native_handle (through a typedef) which makes it annoying to const_cast away in order to call validate. Validate does not change the handle so this is safe. Change-Id: I78b2997eb24074c186ab2d497b2faf332c7f4a85
Diffstat (limited to 'opengl/system')
-rw-r--r--opengl/system/OpenglSystemCommon/gralloc_cb.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/opengl/system/OpenglSystemCommon/gralloc_cb.h b/opengl/system/OpenglSystemCommon/gralloc_cb.h
index a0f6ed8..d2d6f35 100644
--- a/opengl/system/OpenglSystemCommon/gralloc_cb.h
+++ b/opengl/system/OpenglSystemCommon/gralloc_cb.h
@@ -71,8 +71,8 @@ struct cb_handle_t : public native_handle {
numInts = CB_HANDLE_NUM_INTS(numFds);
}
- static bool validate(cb_handle_t * hnd) {
- return (hnd &&
+ static bool validate(const cb_handle_t* hnd) {
+ return (hnd &&
hnd->version == sizeof(native_handle) &&
hnd->magic == BUFFER_HANDLE_MAGIC &&
hnd->numInts == CB_HANDLE_NUM_INTS(hnd->numFds));