/hg/icedtea8-forest/jdk: 3 new changesets
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Thu May 3 03:54:37 UTC 2018
changeset b77308735540 in /hg/icedtea8-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea8-forest/jdk?cmd=changeset;node=b77308735540
author: kaddepalli
date: Mon Feb 05 13:44:41 2018 +0530
8171000, PR3542, RH1402819: Robot.createScreenCapture() crashes in wayland mode
Reviewed-by: serb, mhalder
changeset 556adf3a76aa in /hg/icedtea8-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea8-forest/jdk?cmd=changeset;node=556adf3a76aa
author: prr
date: Mon Feb 12 08:56:44 2018 -0800
8197546: Fix for 8171000 breaks Solaris + Linux builds
Reviewed-by: serb, jdv
changeset 388fc8da2304 in /hg/icedtea8-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea8-forest/jdk?cmd=changeset;node=388fc8da2304
author: andrew
date: Mon Apr 30 19:04:05 2018 +0100
PR3575: System cacerts database handling should not affect jssecacerts
diffstat:
src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java | 16 +-
src/solaris/native/sun/awt/multiVis.c | 91 +++------
2 files changed, 40 insertions(+), 67 deletions(-)
diffs (147 lines):
diff -r 39bfc94b1f42 -r 388fc8da2304 src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java
--- a/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java Tue Mar 27 18:24:51 2018 +0100
+++ b/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java Mon Apr 30 19:04:05 2018 +0100
@@ -162,7 +162,7 @@
* Try:
* javax.net.ssl.trustStore (if this variable exists, stop)
* jssecacerts
- * cacerts
+ * cacerts (system and local)
*
* If none exists, we use an empty keystore.
*/
@@ -174,14 +174,14 @@
storeFile = new File(storeFileName);
fis = getFileInputStream(storeFile);
} else {
- /* Check system cacerts DB first; /etc/pki/java/cacerts */
- storeFile = new File(sep + "etc" + sep + "pki" + sep
- + "java" + sep + "cacerts");
+ String javaHome = props.get("javaHome");
+ storeFile = new File(javaHome + sep + "lib" + sep
+ + "security" + sep +
+ "jssecacerts");
if ((fis = getFileInputStream(storeFile)) == null) {
- String javaHome = props.get("javaHome");
- storeFile = new File(javaHome + sep + "lib" + sep
- + "security" + sep +
- "jssecacerts");
+ /* Check system cacerts DB first; /etc/pki/java/cacerts */
+ storeFile = new File(sep + "etc" + sep + "pki" + sep
+ + "java" + sep + "cacerts");
if ((fis = getFileInputStream(storeFile)) == null) {
storeFile = new File(javaHome + sep + "lib" + sep
+ "security" + sep +
diff -r 39bfc94b1f42 -r 388fc8da2304 src/solaris/native/sun/awt/multiVis.c
--- a/src/solaris/native/sun/awt/multiVis.c Tue Mar 27 18:24:51 2018 +0100
+++ b/src/solaris/native/sun/awt/multiVis.c Mon Apr 30 19:04:05 2018 +0100
@@ -394,77 +394,50 @@
XRectangle bbox; /* bounding box of grabbed area */
list_ptr regions;/* list of regions to read from */
{
- image_region_type *reg;
- int32_t dst_x, dst_y; /* where in pixmap to write (UL) */
- int32_t diff;
-
- XImage *reg_image,*ximage ;
- int32_t srcRect_x,srcRect_y,srcRect_width,srcRect_height ;
- int32_t rem ;
- int32_t bytes_per_line;
- int32_t bitmap_unit;
-
- bitmap_unit = sizeof (long);
- if (format == ZPixmap)
- bytes_per_line = width*depth/8;
- else
- bytes_per_line = width/8;
-
-
- /* Find out how many more bytes are required for padding so that
- ** bytes per scan line will be multiples of bitmap_unit bits */
- if (format == ZPixmap) {
- rem = (bytes_per_line*8)%bitmap_unit;
- if (rem)
- bytes_per_line += (rem/8 + 1);
- }
+ XImage *ximage ;
+ image_region_type* reg;
+ int32_t rect;
ximage = XCreateImage(disp,fakeVis,(uint32_t) depth,format,0,NULL,
(uint32_t)width,(uint32_t)height,8,0);
- bytes_per_line = ximage->bytes_per_line;
-
- if (format == ZPixmap)
- ximage->data = malloc(height*bytes_per_line);
- else
- ximage->data = malloc(height*bytes_per_line*depth);
-
+ ximage->data = calloc(ximage->bytes_per_line*height*((format==ZPixmap)? 1 : depth), sizeof(char));
ximage->bits_per_pixel = depth; /** Valid only if format is ZPixmap ***/
for (reg = (image_region_type *) first_in_list( regions); reg;
reg = (image_region_type *) next_in_list( regions))
{
- int32_t rect;
- struct my_XRegion *vis_reg;
- vis_reg = (struct my_XRegion *)(reg->visible_region);
- for (rect = 0;
- rect < vis_reg->numRects;
- rect++)
+ struct my_XRegion *vis_reg = (struct my_XRegion *)(reg->visible_region);
+ for (rect = 0; rect < vis_reg->numRects; rect++)
{
- /** ------------------------------------------------------------------------
- Intersect bbox with visible part of region giving src rect & output
- location. Width is the min right side minus the max left side.
- Similar for height. Offset src rect so x,y are relative to
- origin of win, not the root-relative visible rect of win.
- ------------------------------------------------------------------------ **/
- srcRect_width = MIN( vis_reg->rects[rect].x2, bbox.width + bbox.x)
- - MAX( vis_reg->rects[rect].x1, bbox.x);
+ /** ------------------------------------------------------------------------
+ Intersect bbox with visible part of region giving src rect & output
+ location. Width is the min right side minus the max left side.
+ Similar for height. Offset src rect so x,y are relative to
+ origin of win, not the root-relative visible rect of win.
+ ------------------------------------------------------------------------ **/
+ int32_t srcRect_width = MIN( vis_reg->rects[rect].x2, bbox.width + bbox.x)
+ - MAX( vis_reg->rects[rect].x1, bbox.x);
+
+ int32_t srcRect_height = MIN( vis_reg->rects[rect].y2, bbox.height + bbox.y)
+ - MAX( vis_reg->rects[rect].y1, bbox.y);
- srcRect_height = MIN( vis_reg->rects[rect].y2, bbox.height + bbox.y)
- - MAX( vis_reg->rects[rect].y1, bbox.y);
+ int32_t diff = bbox.x - vis_reg->rects[rect].x1;
+ int32_t srcRect_x = MAX( 0, diff) + (vis_reg->rects[rect].x1 - reg->x_rootrel - reg->border);
+ int32_t dst_x = MAX( 0, -diff) ;
- diff = bbox.x - vis_reg->rects[rect].x1;
- srcRect_x = MAX( 0, diff) + (vis_reg->rects[rect].x1 - reg->x_rootrel - reg->border);
- dst_x = MAX( 0, -diff) ;
- diff = bbox.y - vis_reg->rects[rect].y1;
- srcRect_y = MAX( 0, diff) + (vis_reg->rects[rect].y1 - reg->y_rootrel - reg->border);
- dst_y = MAX( 0, -diff) ;
- reg_image = XGetImage(disp,reg->win,srcRect_x,srcRect_y,
- (uint32_t) srcRect_width, (uint32_t) srcRect_height,AllPlanes,format) ;
- TransferImage(disp,reg_image,srcRect_width,
- srcRect_height,reg,ximage,dst_x,dst_y) ;
- XDestroyImage(reg_image);
- }
+ diff = bbox.y - vis_reg->rects[rect].y1;
+ int32_t srcRect_y = MAX( 0, diff) + (vis_reg->rects[rect].y1 - reg->y_rootrel - reg->border);
+ int32_t dst_y = MAX( 0, -diff) ;
+ XImage* reg_image = XGetImage(disp,reg->win,srcRect_x,srcRect_y,
+ (uint32_t) srcRect_width, (uint32_t) srcRect_height,AllPlanes,format) ;
+
+ if (reg_image) {
+ TransferImage(disp,reg_image,srcRect_width,
+ srcRect_height,reg,ximage,dst_x,dst_y) ;
+ XDestroyImage(reg_image);
+ }
+ }
}
return ximage ;
}
More information about the distro-pkg-dev
mailing list