< prev index next >

src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLGraphicsConfig.m

Print this page




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 #import <stdlib.h>
  27 #import <string.h>
  28 #import <ApplicationServices/ApplicationServices.h>
  29 #import <JavaNativeFoundation/JavaNativeFoundation.h>
  30 
  31 #import "sun_java2d_opengl_CGLGraphicsConfig.h"
  32 
  33 #import "jni.h"
  34 #import "jni_util.h"
  35 #import "CGLGraphicsConfig.h"
  36 #import "CGLSurfaceData.h"
  37 #import "LWCToolkit.h"
  38 #import "ThreadUtilities.h"
  39 





  40 #pragma mark -
  41 #pragma mark "--- Mac OS X specific methods for GL pipeline ---"
  42 
  43 /**
  44  * Disposes all memory and resources associated with the given
  45  * CGLGraphicsConfigInfo (including its native OGLContext data).
  46  */
  47 void
  48 OGLGC_DestroyOGLGraphicsConfig(jlong pConfigInfo)
  49 {
  50     J2dTraceLn(J2D_TRACE_INFO, "OGLGC_DestroyOGLGraphicsConfig");
  51 
  52     CGLGraphicsConfigInfo *cglinfo =
  53         (CGLGraphicsConfigInfo *)jlong_to_ptr(pConfigInfo);
  54     if (cglinfo == NULL) {
  55         J2dRlsTraceLn(J2D_TRACE_ERROR,
  56                       "OGLGC_DestroyOGLGraphicsConfig: info is null");
  57         return;
  58     }
  59 




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 





  26 #import "sun_java2d_opengl_CGLGraphicsConfig.h"
  27 


  28 #import "CGLGraphicsConfig.h"
  29 #import "CGLSurfaceData.h"

  30 #import "ThreadUtilities.h"
  31 
  32 #import <stdlib.h>
  33 #import <string.h>
  34 #import <ApplicationServices/ApplicationServices.h>
  35 #import <JavaNativeFoundation/JavaNativeFoundation.h>
  36 
  37 #pragma mark -
  38 #pragma mark "--- Mac OS X specific methods for GL pipeline ---"
  39 
  40 /**
  41  * Disposes all memory and resources associated with the given
  42  * CGLGraphicsConfigInfo (including its native OGLContext data).
  43  */
  44 void
  45 OGLGC_DestroyOGLGraphicsConfig(jlong pConfigInfo)
  46 {
  47     J2dTraceLn(J2D_TRACE_INFO, "OGLGC_DestroyOGLGraphicsConfig");
  48 
  49     CGLGraphicsConfigInfo *cglinfo =
  50         (CGLGraphicsConfigInfo *)jlong_to_ptr(pConfigInfo);
  51     if (cglinfo == NULL) {
  52         J2dRlsTraceLn(J2D_TRACE_ERROR,
  53                       "OGLGC_DestroyOGLGraphicsConfig: info is null");
  54         return;
  55     }
  56 


< prev index next >