EGLContext.java revision 6b1e838fc16d397359f82c3a4f5700f1ed7dd910
16b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer/*
26b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer**
36b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer** Copyright 2012, The Android Open Source Project
46b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer**
56b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer** Licensed under the Apache License, Version 2.0 (the "License");
66b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer** you may not use this file except in compliance with the License.
76b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer** You may obtain a copy of the License at
86b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer**
96b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer**     http://www.apache.org/licenses/LICENSE-2.0
106b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer**
116b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer** Unless required by applicable law or agreed to in writing, software
126b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer** distributed under the License is distributed on an "AS IS" BASIS,
136b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
146b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer** See the License for the specific language governing permissions and
156b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer** limitations under the License.
166b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer*/
176b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer
186b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshoferpackage android.opengl;
196b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer
206b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer/**
216b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer * @hide
226b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer */
236b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshoferpublic class EGLContext extends EGLObjectHandle {
246b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer    public EGLContext(int handle) {
256b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer        super(handle);
266b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer    }
276b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer
286b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer    @Override
296b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer    public boolean equals(Object o) {
306b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer        if (this == o) return true;
316b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer        if (o == null || getClass() != o.getClass()) return false;
326b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer
336b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer        EGLContext that = (EGLContext) o;
346b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer        return getHandle() == that.getHandle();
356b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer    }
366b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer
376b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer    @Override
386b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer    public int hashCode() {
396b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer        return getHandle();
406b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer    }
416b1e838fc16d397359f82c3a4f5700f1ed7dd910Thomas Tafertshofer}
42