summaryrefslogtreecommitdiffstats
path: root/opengl/java/com/google/android/gles_jni/EGLSurfaceImpl.java
diff options
context:
space:
mode:
authorAshok Bhat <ashok.bhat@arm.com>2014-01-27 16:58:46 +0000
committerDavid Butcher <david.butcher@arm.com>2014-01-31 16:27:30 +0000
commit863f98bbb3e234e18c62ce2678ae970b75995f69 (patch)
tree119cc10a408e32cd789a6d71244caaa33f096f8c /opengl/java/com/google/android/gles_jni/EGLSurfaceImpl.java
parente05b7b50e234e8ed2471f5ad96bb3d715067e9f3 (diff)
downloadframeworks_base-863f98bbb3e234e18c62ce2678ae970b75995f69.zip
frameworks_base-863f98bbb3e234e18c62ce2678ae970b75995f69.tar.gz
frameworks_base-863f98bbb3e234e18c62ce2678ae970b75995f69.tar.bz2
Use long to store pointers in GLES_JNI/EGL classes
Change-Id: I43b32f2a85c07b3f59c57e28e3d03e8d1cabcd8b Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Diffstat (limited to 'opengl/java/com/google/android/gles_jni/EGLSurfaceImpl.java')
-rw-r--r--opengl/java/com/google/android/gles_jni/EGLSurfaceImpl.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/opengl/java/com/google/android/gles_jni/EGLSurfaceImpl.java b/opengl/java/com/google/android/gles_jni/EGLSurfaceImpl.java
index e7f15dc..7a3ed24 100644
--- a/opengl/java/com/google/android/gles_jni/EGLSurfaceImpl.java
+++ b/opengl/java/com/google/android/gles_jni/EGLSurfaceImpl.java
@@ -19,13 +19,13 @@ package com.google.android.gles_jni;
import javax.microedition.khronos.egl.*;
public class EGLSurfaceImpl extends EGLSurface {
- int mEGLSurface;
- private int mNativePixelRef;
+ long mEGLSurface;
+ private long mNativePixelRef;
public EGLSurfaceImpl() {
mEGLSurface = 0;
mNativePixelRef = 0;
}
- public EGLSurfaceImpl(int surface) {
+ public EGLSurfaceImpl(long surface) {
mEGLSurface = surface;
mNativePixelRef = 0;
}
@@ -43,6 +43,12 @@ public class EGLSurfaceImpl extends EGLSurface {
@Override
public int hashCode() {
- return mEGLSurface;
+ /*
+ * Based on the algorithm suggested in
+ * http://developer.android.com/reference/java/lang/Object.html
+ */
+ int result = 17;
+ result = 31 * result + (int) (mEGLSurface ^ (mEGLSurface >>> 32));
+ return result;
}
}