Fix wrapper equals()

Make it faster and correcter.

Bug 9204146

Change-Id: Ieeb97b72005e831ec6b94fc24ed2c3bc03307c2a
This commit is contained in:
Andy McFadden
2013-06-21 16:21:05 -07:00
parent e36b93575f
commit a017553638
6 changed files with 4 additions and 6 deletions

View File

@@ -1,5 +1,4 @@
/*
**
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");

View File

@@ -29,7 +29,7 @@ public class EGLConfig extends EGLObjectHandle {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!(o instanceof EGLConfig)) return false;
EGLConfig that = (EGLConfig) o;
return getHandle() == that.getHandle();

View File

@@ -29,7 +29,7 @@ public class EGLContext extends EGLObjectHandle {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!(o instanceof EGLContext)) return false;
EGLContext that = (EGLContext) o;
return getHandle() == that.getHandle();

View File

@@ -29,7 +29,7 @@ public class EGLDisplay extends EGLObjectHandle {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!(o instanceof EGLDisplay)) return false;
EGLDisplay that = (EGLDisplay) o;
return getHandle() == that.getHandle();

View File

@@ -1,5 +1,4 @@
/*
**
** Copyright 2013, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");

View File

@@ -29,7 +29,7 @@ public class EGLSurface extends EGLObjectHandle {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!(o instanceof EGLSurface)) return false;
EGLSurface that = (EGLSurface) o;
return getHandle() == that.getHandle();