Fix wrapper equals()
Make it faster and correcter. Bug 9204146 Change-Id: Ieeb97b72005e831ec6b94fc24ed2c3bc03307c2a
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
/*
|
||||
**
|
||||
** Copyright 2012, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/*
|
||||
**
|
||||
** Copyright 2013, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user