equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
70 { |
70 { |
71 jint returnVal = -1; |
71 jint returnVal = -1; |
72 unsigned char *pixelPtr; |
72 unsigned char *pixelPtr; |
73 SurfaceDataRasInfo lockInfo; |
73 SurfaceDataRasInfo lockInfo; |
74 SurfaceDataOps *ops; |
74 SurfaceDataOps *ops; |
|
75 lockInfo.rasBase = NULL; |
75 |
76 |
76 ops = SurfaceData_GetOps(env, sd); |
77 ops = SurfaceData_GetOps(env, sd); |
77 JNU_CHECK_EXCEPTION_RETURN(env, -1); |
78 JNU_CHECK_EXCEPTION_RETURN(env, -1); |
78 |
79 |
79 if (!(pixelPtr = DBN_GetPixelPointer(env, x, y, &lockInfo, |
80 if (!(pixelPtr = DBN_GetPixelPointer(env, x, y, &lockInfo, |
111 jint x, jint y, jint val, jobject sd) |
112 jint x, jint y, jint val, jobject sd) |
112 { |
113 { |
113 SurfaceDataRasInfo lockInfo; |
114 SurfaceDataRasInfo lockInfo; |
114 SurfaceDataOps *ops; |
115 SurfaceDataOps *ops; |
115 unsigned char *pixelPtr; |
116 unsigned char *pixelPtr; |
116 |
117 lockInfo.rasBase = NULL; |
117 |
118 |
118 ops = SurfaceData_GetOps(env, sd); |
119 ops = SurfaceData_GetOps(env, sd); |
119 JNU_CHECK_EXCEPTION(env); |
120 JNU_CHECK_EXCEPTION(env); |
120 |
121 |
121 if (!(pixelPtr = DBN_GetPixelPointer(env, x, y, &lockInfo, |
122 if (!(pixelPtr = DBN_GetPixelPointer(env, x, y, &lockInfo, |