src/macosx/native/sun/awt/ImageSurfaceData.h

Print this page




  24  */
  25 
  26 #import "QuartzSurfaceData.h"
  27 #import <pthread.h>
  28 
  29 typedef UInt8 Pixel8bit;
  30 typedef UInt16 Pixel16bit;
  31 typedef UInt32 Pixel32bit;
  32 
  33 typedef struct _ImageSDOps ImageSDOps;
  34 
  35 ImageSDOps*    LockImage(JNIEnv* env, jobject imageSurfaceData);
  36 void        UnlockImage(JNIEnv* env, ImageSDOps* isdo);
  37 ImageSDOps*    LockImagePixels(JNIEnv* env, jobject imageSurfaceData);
  38 void        UnlockImagePixels(JNIEnv* env, ImageSDOps* isdo);
  39 
  40 // if there is no image created for isdo.imgRef, it creates and image using the isdo.dataProvider
  41 // If there is an image present, this is a no-op
  42 void makeSureImageIsCreated(ImageSDOps* isdo);
  43 
  44 struct _ContextInfo
  45 {
  46     BOOL                useWindowContextReference;
  47     BOOL                canUseJavaPixelsAsContext;
  48     size_t                bitsPerComponent;
  49     size_t                bytesPerPixel;
  50     size_t                bytesPerRow;
  51     CGImageAlphaInfo    alphaInfo;
  52     CGColorSpaceRef        colorSpace;
  53 }
  54 typedef ContextInfo;
  55 
  56 struct _ImageInfo
  57 {
  58     size_t                bitsPerComponent;
  59     size_t                bitsPerPixel;
  60     size_t                bytesPerPixel;
  61     size_t                bytesPerRow;
  62     CGImageAlphaInfo    alphaInfo;
  63     CGColorSpaceRef        colorSpace;
  64 }
  65 typedef ImageInfo;
  66 
  67 struct _ImageSDOps
  68 {
  69     QuartzSDOps                qsdo; // must be the first entry!
  70 
  71     ContextInfo                contextInfo;
  72     ImageInfo                imageInfo;
  73     BOOL                    isSubImage;
  74 
  75     jint*                    javaImageInfo;
  76 
  77     // parameters specifying this BufferedImage given to us from Java
  78     jobject                    array;
  79     jint                    offset;
  80     jint                    width;
  81     jint                    height;
  82     jint                    javaPixelBytes;
  83     jint                    javaPixelsBytesPerRow;
  84     jobject                    icm;
  85     jint                    type;




  24  */
  25 
  26 #import "QuartzSurfaceData.h"
  27 #import <pthread.h>
  28 
  29 typedef UInt8 Pixel8bit;
  30 typedef UInt16 Pixel16bit;
  31 typedef UInt32 Pixel32bit;
  32 
  33 typedef struct _ImageSDOps ImageSDOps;
  34 
  35 ImageSDOps*    LockImage(JNIEnv* env, jobject imageSurfaceData);
  36 void        UnlockImage(JNIEnv* env, ImageSDOps* isdo);
  37 ImageSDOps*    LockImagePixels(JNIEnv* env, jobject imageSurfaceData);
  38 void        UnlockImagePixels(JNIEnv* env, ImageSDOps* isdo);
  39 
  40 // if there is no image created for isdo.imgRef, it creates and image using the isdo.dataProvider
  41 // If there is an image present, this is a no-op
  42 void makeSureImageIsCreated(ImageSDOps* isdo);
  43 
  44 typedef struct _ContextInfo
  45 {
  46     BOOL                useWindowContextReference;
  47     BOOL                canUseJavaPixelsAsContext;
  48     size_t                bitsPerComponent;
  49     size_t                bytesPerPixel;
  50     size_t                bytesPerRow;
  51     CGImageAlphaInfo    alphaInfo;
  52     CGColorSpaceRef        colorSpace;
  53 } ContextInfo;

  54 
  55 typedef struct _ImageInfo
  56 {
  57     size_t                bitsPerComponent;
  58     size_t                bitsPerPixel;
  59     size_t                bytesPerPixel;
  60     size_t                bytesPerRow;
  61     CGImageAlphaInfo    alphaInfo;
  62     CGColorSpaceRef        colorSpace;
  63 } ImageInfo;

  64 
  65 struct _ImageSDOps
  66 {
  67     QuartzSDOps                qsdo; // must be the first entry!
  68 
  69     ContextInfo                contextInfo;
  70     ImageInfo                imageInfo;
  71     BOOL                    isSubImage;
  72 
  73     jint*                    javaImageInfo;
  74 
  75     // parameters specifying this BufferedImage given to us from Java
  76     jobject                    array;
  77     jint                    offset;
  78     jint                    width;
  79     jint                    height;
  80     jint                    javaPixelBytes;
  81     jint                    javaPixelsBytesPerRow;
  82     jobject                    icm;
  83     jint                    type;