src/java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.h

Print this page


   1 /*
   2  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   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


 179     jint                brushclr;
 180     AwtPen              *pen;           // used for offscreen surfaces only
 181     jint                penclr;
 182 
 183     int                 x, y, w, h;     // REMIND: store in TLS
 184     CriticalSection     *surfaceLock;   // REMIND: try to remove
 185     AwtWin32GraphicsDevice *device;
 186 };
 187 
 188 #define WIN32SD_LOCK_UNLOCKED   0       /* surface is not locked */
 189 #define WIN32SD_LOCK_BY_NULL    1       /* surface locked for NOP */
 190 #define WIN32SD_LOCK_BY_DIB     2       /* surface locked by BitBlt */
 191 
 192 extern "C" {
 193 
 194 /*
 195  * Structure for holding the graphics state of a thread.
 196  */
 197 typedef struct {
 198     HDC         hDC;

 199     GDIWinSDOps *wsdo;
 200     LONG        wsdoTimeStamp; // wsdo creation time stamp.
 201                                // Other threads may deallocate wsdo
 202                                // and then allocate a new GDIWinSDOps
 203                                // structure at the same memory location.
 204                                // Time stamp is the only way to detect if
 205                                // wsdo got changed.
 206                                // see bug# 6859086
 207     RECT        bounds;
 208     jobject     clip;
 209     jobject     comp;
 210     jint        xorcolor;
 211     jint        patrop;
 212     jint        type;
 213     AwtBrush    *brush;
 214     jint        brushclr;
 215     AwtPen      *pen;
 216     jint        penclr;
 217 } ThreadGraphicsInfo;
 218 


   1 /*
   2  * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   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


 179     jint                brushclr;
 180     AwtPen              *pen;           // used for offscreen surfaces only
 181     jint                penclr;
 182 
 183     int                 x, y, w, h;     // REMIND: store in TLS
 184     CriticalSection     *surfaceLock;   // REMIND: try to remove
 185     AwtWin32GraphicsDevice *device;
 186 };
 187 
 188 #define WIN32SD_LOCK_UNLOCKED   0       /* surface is not locked */
 189 #define WIN32SD_LOCK_BY_NULL    1       /* surface locked for NOP */
 190 #define WIN32SD_LOCK_BY_DIB     2       /* surface locked by BitBlt */
 191 
 192 extern "C" {
 193 
 194 /*
 195  * Structure for holding the graphics state of a thread.
 196  */
 197 typedef struct {
 198     HDC         hDC;
 199     HWND        hWnd;
 200     GDIWinSDOps *wsdo;
 201     LONG        wsdoTimeStamp; // wsdo creation time stamp.
 202                                // Other threads may deallocate wsdo
 203                                // and then allocate a new GDIWinSDOps
 204                                // structure at the same memory location.
 205                                // Time stamp is the only way to detect if
 206                                // wsdo got changed.
 207                                // see bug# 6859086
 208     RECT        bounds;
 209     jobject     clip;
 210     jobject     comp;
 211     jint        xorcolor;
 212     jint        patrop;
 213     jint        type;
 214     AwtBrush    *brush;
 215     jint        brushclr;
 216     AwtPen      *pen;
 217     jint        penclr;
 218 } ThreadGraphicsInfo;
 219