Hello community,

here is the log from the commit of package java-10-openjdk for openSUSE:Factory 
checked in at 2017-12-09 20:29:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/java-10-openjdk (Old)
 and      /work/SRC/openSUSE:Factory/.java-10-openjdk.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "java-10-openjdk"

Sat Dec  9 20:29:33 2017 rev:4 rq:555188 version:10.0.0.0~35

Changes:
--------
--- /work/SRC/openSUSE:Factory/java-10-openjdk/java-10-openjdk.changes  
2017-12-01 15:53:37.456067019 +0100
+++ /work/SRC/openSUSE:Factory/.java-10-openjdk.new/java-10-openjdk.changes     
2017-12-09 20:30:39.552486297 +0100
@@ -1,0 +2,329 @@
+Fri Dec  8 07:53:24 UTC 2017 - [email protected]
+
+- Update to upstream tag jdk-10+35
+  * Fixes
+    + S5031664: Increase thread safety of EventListenerList
+    + S6354947: [Fmt-*] Clarify DecimalFormat description of
+      FieldPosition use
+    + S6415680: (bf) MappedByteBuffer.get() can provoke crash with
+      EXCEPTION_IN_PAGE_ERROR
+    + S8015667: Stream.toArray(IntFunction) ArrayStoreException
+      should refer to component type of array
+    + S8024352: MBeanOperationInfo accepts any int value as "impact"
+    + S8034252: Fix non ASCII text file T6302184.java
+    + S8043070: nmethod::verify_interrupt_point() shouldn't enter
+      safepoint
+    + S8043334: Typo in javax/swing/JComponent.html
+    + S8059835: Optimistic splitting doesn't work with let and const
+    + S8065838: compiler/relocations/TestPrintRelocations.java times
+      out after 1920 seconds
+    + S8068024: Null pointer dereference in
+      jdk/src/macosx/native/apple/security/KeystoreImpl.m
+    + S8133616: compiler error messages for dup single type, single
+      static import switched
+    + S8135178: importPackage not working even with load "Mozilla
+      compatibility script"
+    + S8139653: Freetype bundled on macosx, but not correctly linked
+    + S8146115: Improve docker container detection and resource
+      configuration usage
+    + S8146977: Move the output "Building configuration X (matching
+      Y)" to lower log level
+    + S8158366: [macosx] Regression:
+      closed/java/awt/dnd/RecognizedActionTest/RecognizedActionTest.html
+      fails
+    + S8159142: [hidpi] Visible artifacts in
+      sun/java2d/SunGraphics2D/DrawImageBilinear.java
+    + S8160303: parse_method_pattern only scans 254 chars
+    + S8160406: Collection.toArray() spec should be explicit about
+      returning precisely an Object[]
+    + S8160548: Inconsistent inlining behavior with CompileOnly
+    + S8169766: c1 + Xcomp reresolving call target every invocation
+    + S8175795: configure should verify that system zlib contains
+      needed functionality
+    + S8175891: JrtPath::resolve off-by-one pre-sizing cause for
+      memory pressure
+    + S8176072: READING attributes are not available on TSF
+    + S8176188:
+      jdk/internal/misc/JavaLangAccess/NewUnsafeString.java
+      failing since 9-b93
+    + S8177290: add copy factory methods for unmodifiable List, Set,
+      Map
+    + S8177956: Add TEST_VM_OPTS as convenience for run-test
+      arguments
+    + S8177957: run-test summary lines look bad/misleading with long
+      test names
+    + S8178025: HiDPI with non-integer scale factor - SPANs in HTML
+      are rendered overlapping each other
+    + S8178048: [JVMCI] improve
+      HotSpotResolvedJavaFieldImpl.hashCode()
+    + S8178109: More useful documentation on /help
+    + S8178427: NPE in Infer$CheckUpperBounds
+    + S8178430: JMenu in GridBagLayout flickers when label text
+      shows "..." and is updated
+    + S8179554: make run-test does not respect ProblemList.txt
+    + S8179555: make run-test should always use a fresh, clean
+      JTwork directory
+    + S8179603: create a jtreg test group for hotspot tests
+      excluding application testing
+    + S8181175: Stream.concat behaves like terminal operation
+    + S8182108: javadoc makes up type variables for grandparent
+      types
+    + S8182284: G1Analytics uses uninitialized fields
+    + S8182413: jdwp-protocol is generated without a DOCTYPE
+      directive
+    + S8182484: Remove 1024-bit default requirement from javadoc of
+      java.security.interfaces.DSAKeyPairGenerator
+    + S8182742: ClassLoader.getResourceXXX throws NPE when
+      ClassLoader created by defineModulesWithXXX
+    + S8184683: Add @since and default methods of Compiler Tree API
+      methods
+    + S8184690: add Collectors for collecting into unmodifiable
+      List, Set, and Map
+    + S8185130: jlink should throw error if target image and current
+      JDK versions don't match
+    + S8185369: Clean up the javadoc stylesheet
+    + S8185451: Misleading 'cannot be accessed from outside package'
+      diagnostic for inconsistent varargs override
+    + S8185855: Debug exception stacks should be clearer
+    + S8185983: Javac should reject TypeArguments on field access
+      expression
+    + S8185985: Html files in doc-files directories should be
+      wrapped with standard header and footer
+    + S8186057: TLS interoperability testing between different Java
+      versions
+    + S8186087: jar tool fails to create a multi-release jar when
+      validating nested classes
+    + S8186441: Change of behavior in the getMessage () method of
+      the SOAPMessageContextImpl class
+    + S8186480: Remove warning when AssumeMP is true and ergonomics
+      determines to use one worker thread
+    + S8186535: Remove deprecated pre-1.2 SecurityManager methods
+      and fields
+    + S8186540: [TESTBUG]
+      serviceability/dcmd/jvmti/LoadAgentDcmdTest.java failed to
+      clean up files in agentvm mode
+    + S8186571: Implementation: JEP 307: Parallel Full GC for G1
+    + S8186736: Spec clarifications for IllegalArgumentException
+      throwing - ModuleLayer.defineX methods
+    + S8186737: Lookup argument for StringConcatFactory.makeConcat &
+      makeConcatWithConstants cannot have privileges less than
+      PRIVATE
+    + S8186961: Class.getFields() does not return fields of
+      previously visited super interfaces/classes.
+    + S8187118: Remove appending -cp path to the boot class path at
+      AppCDS dump time
+    + S8187119: Consolidate record_shared_class_loader_type() and
+      record_result()
+    + S8187222: ClassLoader.getSystemClassLoader not clear if
+      recursive initialization leads to ISE or unspecified error
+    + S8187237: Need to define the behaviour for 0 and 1 argument
+      method type in StringConcatFactory.makeConcat
+    + S8187367: Numerous swing display problems with scaled displays
+      on Windows
+    + S8187497: Redundant variable assignment in
+      Java_sun_security_jgss_wrapper_GSSLibStub_getMic
+    + S8187551: MessageFormat.setFormat(int, Format) AIOOBE not
+      thrown when documented
+    + S8187910: Charset MS950_HKSCS not supported in JDK 9
+    + S8187947: A race condition in SubmissionPublisher
+    + S8187954: Update JAX-WS RI integration to latest version
+    + S8187985: Broken certificate number in debug output
+    + S8188122: Path length limits on Windows leads to obscure class
+      loading failures
+    + S8188870: Bump classfile version number to 54
+    + S8189099: JTReg now supports 256 jobs
+    + S8189170: Add option to disable stack overflow checking in
+      primordial thread for use with JNI_CreateJavaJVM
+    + S8189171: Move GC argument processing into GC specific classes
+    + S8189177: AARCH64: Improve _updateBytesCRC32C intrinsic
+    + S8189204: Possible NPE in Component::getLocationOnScreen()
+    + S8189331:
+      java/io/Serializable/maskSyntheticModifier/MaskSyntheticModifierTest.java
+      failed incorrect serialVersionUID
+    + S8189389: Move heap creation into GC interface
+    + S8189611: JarFile versioned stream and real name support
+    + S8189734: Cleanup MarkSweep when G1 dependency is gone
+    + S8189749: Devise strategy for making source level checks more
+      uniform
+    + S8189762: [TESTBUG] Create tests for JDK-8146115 container
+      awareness and resource configuration
+    + S8189871: Refactor GC barriers to use declarative semantics
+    + S8189941: Implementation JEP 312: Thread-local handshake
+    + S8190198: SA: Framework for writing 'jhsdb clhsdb' commands
+      tests and testcases for some of the commands
+    + S8190228: Remove redundant modifiers in java.desktop module.
+    + S8190284: link-time-opt should not be using -fwhole-program
+    + S8190307: SA tests for the clhsdb commands: universe,
+      intconstant, type
+    + S8190332: PngReader throws NegativeArraySizeException/OOM
+      error  when IHDR width is very large
+    + S8190348: [TESTBUG] Test
+      
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentCanvas.java
+      fails
+    + S8190357: NMT: Include metadata information in NMT final
+      report when PrintNMTStatistics is on
+    + S8190375: Java Crash in JavaBug.formatPos(I)Ljava/lang/String
+    + S8190418: Stop generating jvmtiEnvStub and jvmtiEnvRecommended
+    + S8190464: OpenJDK on macosx needs to bundle freetype
+    + S8190552: Augment the Compiler API tree with APIs to represent
+      HTML content
+    + S8190674: sun/security/tools/jarsigner/TimestampCheck.java
+      failed with java.nio.file.NoSuchFileException: ts2.cert
+    + S8190817: deopt special-case for _return_register_finalizer is
+      confusing and leads to bugs
+    + S8190843: can not set/get extendedOptions to ServerSocket
+    + S8190861: [TESTBUG]
+      
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java
+      is wrong
+    + S8190891: Clean up G1 barrier code in compiler interface (ci)
+    + S8190911: tools/jdeps/MultiReleaseJar.java failed with
+      java.lang.IllegalThreadStateException
+    + S8190925: Deprecate FastTLABRefill and set default off
+    + S8190939: JShell: gives a compiler error evaluating an
+      expression of inaccessible type
+    + S8190975: [Graal] Tests which run with "--limit-modules
+      java.base" could fail when Graal is used as JIT
+    + S8191042: Deprecate VM option CheckEndorsedAndExtDirs
+    + S8191049: Add alternate version of pns() that is callable from
+      within hotspot source
+    + S8191069: Miscellaneous changes imported from jsr166 CVS
+      2017-12
+    + S8191132: assert condition should not be in quotes
+    + S8191173: (cl) Clarify or remove "for delegation" in
+      ClassLoader spec
+    + S8191203: Remove duplicated jimage.hpp
+    + S8191205: Set native-debug-symbols default to "external"
+    + S8191212: AIX: Build and polling page allocation broken after
+      8189941
++++ 132 more lines (skipped)
++++ between /work/SRC/openSUSE:Factory/java-10-openjdk/java-10-openjdk.changes
++++ and /work/SRC/openSUSE:Factory/.java-10-openjdk.new/java-10-openjdk.changes

Old:
----
  bbd692ad4fa3.tar.bz2

New:
----
  TestCryptoLevel.java
  TestECDSA.java
  d8c634b016c6.tar.bz2
  java10-improved-fonts.patch
  linux_chroot_crash.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ java-10-openjdk.spec ++++++
--- /var/tmp/diff_new_pack.pgcL0S/_old  2017-12-09 20:30:48.020082980 +0100
+++ /var/tmp/diff_new_pack.pgcL0S/_new  2017-12-09 20:30:48.044081837 +0100
@@ -32,10 +32,10 @@
 %global minorver        0
 %global securityver     0
 %global patchver        0
-%global buildver        33
+%global buildver        35
 %global hg_project      jdk
 %global hg_repository   jdk
-%global hg_revision     bbd692ad4fa3
+%global hg_revision     d8c634b016c6
 %global icedtea_sound_version 1.0.1
 %global java_atk_wrapper_version 0.33.2
 # priority must be 6 digits in total
@@ -79,6 +79,9 @@
 %ifarch x86_64 ia64 s390x
 %global bits 64
 %endif
+%if 0%{?__isa_bits}
+%global bits %{__isa_bits}
+%endif
 # Turn on/off some features depending on openSUSE version
 %if 0%{?suse_version} > 1320
 %global with_system_pcsc 1
@@ -133,6 +136,10 @@
 Source11:       jconsole.desktop.in
 # nss configuration file
 Source13:       nss.cfg
+# Ensure we aren't using the limited crypto policy
+Source14:       TestCryptoLevel.java
+# Ensure ECDSA is working
+Source15:       TestECDSA.java
 # Fresh config.guess and config.sub files
 # wget -O config.guess 
'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
 Source100:      config.guess
@@ -166,6 +173,8 @@
 Patch102:       sorted-diff.patch
 Patch103:       jdk10-gcc6.patch
 #
+Patch104:       linux_chroot_crash.patch
+#
 Patch200:       ppc_stack_overflow_fix.patch
 #
 Patch300:       java-10-openjdk-linuxfilestore.patch
@@ -175,6 +184,7 @@
 #
 Patch400:       jaw-misc.patch
 Patch401:       jaw-jdk10.patch
+Patch800:       java10-improved-fonts.patch
 BuildRequires:  alsa-lib-devel
 BuildRequires:  autoconf
 BuildRequires:  automake
@@ -437,6 +447,8 @@
 %patch103 -p1
 %endif
 
+%patch104 -p1
+
 %patch200 -p1
 
 %patch300 -p1
@@ -444,6 +456,8 @@
 %patch302 -p1
 %patch303 -p1
 
+%patch800 -p1
+
 %patch400
 %patch401
 
@@ -492,11 +506,11 @@
 export CFLAGS="$CFLAGS -mieee"
 %endif
 
-EXTRA_CFLAGS="-Wno-error"
-EXTRA_CPP_FLAGS="-Wno-error"
+EXTRA_CFLAGS="-Wno-error -DIMPROVED_FONT_RENDERING"
+EXTRA_CPP_FLAGS="-Wno-error -DIMPROVED_FONT_RENDERING"
 
 %ifarch ppc64 ppc64le ppc
-EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-tree-vectorize -fno-strict-aliasing"
+EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
 %endif
 
 %if 0%{?suse_version} >= 1330
@@ -634,6 +648,15 @@
   nm -aCl "$ZERO_JVM" | grep javaCalls.cpp
 fi
 
+# Check unlimited policy has been used
+$JAVA_HOME/bin/javac -d . %{SOURCE14}
+$JAVA_HOME/bin/java --add-opens java.base/javax.crypto=ALL-UNNAMED 
TestCryptoLevel
+
+# Check ECC is working
+$JAVA_HOME/bin/javac -d . %{SOURCE15}
+#FIXME make it run after system NSS support?
+$JAVA_HOME/bin/java $(echo $(basename %{SOURCE15})|sed "s|\.java||") || true
+
 %install
 export LANG=en_US.UTF-8
 #bnc#530046

++++++ TestCryptoLevel.java ++++++
/* TestCryptoLevel -- Ensure unlimited crypto policy is in use.
   Copyright (C) 2012 Red Hat, Inc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;

import java.security.Permission;
import java.security.PermissionCollection;

public class TestCryptoLevel
{
  public static void main(String[] args)
    throws NoSuchFieldException, ClassNotFoundException,
           IllegalAccessException, InvocationTargetException
  {
    Class<?> cls = null;
    Method def = null, exempt = null;

    try
      {
        cls = Class.forName("javax.crypto.JceSecurity");
      }
    catch (ClassNotFoundException ex)
      {
        System.err.println("Running a non-Sun JDK.");
        System.exit(0);
      }
    try
      {
        def = cls.getDeclaredMethod("getDefaultPolicy");
        exempt = cls.getDeclaredMethod("getExemptPolicy");
      }
    catch (NoSuchMethodException ex)
      {
        System.err.println("Running IcedTea with the original crypto patch.");
        System.exit(0);
      }
    def.setAccessible(true);
    exempt.setAccessible(true);
    PermissionCollection defPerms = (PermissionCollection) def.invoke(null);
    PermissionCollection exemptPerms = (PermissionCollection) 
exempt.invoke(null);
    Class<?> apCls = Class.forName("javax.crypto.CryptoAllPermission");
    Field apField = apCls.getDeclaredField("INSTANCE");
    apField.setAccessible(true);
    Permission allPerms = (Permission) apField.get(null);
    if (defPerms.implies(allPerms) && (exemptPerms == null || 
exemptPerms.implies(allPerms)))
      {
        System.err.println("Running with the unlimited policy.");
        System.exit(0);
      }
    else
      {
        System.err.println("WARNING: Running with a restricted crypto policy.");
        System.exit(-1);
      }
  }
}
++++++ TestECDSA.java ++++++
/* TestECDSA -- Ensure ECDSA signatures are working.
   Copyright (C) 2016 Red Hat, Inc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

import java.math.BigInteger;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.Signature;

/**
 * @test
 */
public class TestECDSA {

    public static void main(String[] args) throws Exception {
        KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC");
        KeyPair key = keyGen.generateKeyPair();
        
        byte[] data = "This is a string to sign".getBytes("UTF-8");
        
        Signature dsa = Signature.getInstance("NONEwithECDSA");
        dsa.initSign(key.getPrivate());
        dsa.update(data);
        byte[] sig = dsa.sign();
        System.out.println("Signature: " + new BigInteger(1, sig).toString(16));
        
        Signature dsaCheck = Signature.getInstance("NONEwithECDSA");
        dsaCheck.initVerify(key.getPublic());
        dsaCheck.update(data);
        boolean success = dsaCheck.verify(sig);
        if (!success) {
            throw new RuntimeException("Test failed. Signature verification 
error");
        }
        System.out.println("Test passed.");
    }
}
++++++ bbd692ad4fa3.tar.bz2 -> d8c634b016c6.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/java-10-openjdk/bbd692ad4fa3.tar.bz2 
/work/SRC/openSUSE:Factory/.java-10-openjdk.new/d8c634b016c6.tar.bz2 differ: 
char 11, line 1

++++++ java10-improved-fonts.patch ++++++
--- jdk10/make/lib/Awt2dLibraries.gmk   2017-11-22 13:37:53.000000000 +0100
+++ jdk10/make/lib/Awt2dLibraries.gmk   2017-12-01 16:30:17.834138061 +0100
@@ -689,7 +689,7 @@
     LDFLAGS_macosx := -undefined dynamic_lookup, \
     LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \
     LIBS_unix := -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \
-    LIBS_linux := -lc, \
+    LIBS_linux := -lc -lfontconfig, \
     LIBS_solaris := -lawt_headless -lc, \
     LIBS_aix := -lawt_headless,\
     LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
--- jdk10/src/java.desktop/share/native/libfontmanager/freetypeScaler.c 
2017-11-22 13:37:53.000000000 +0100
+++ jdk10/src/java.desktop/share/native/libfontmanager/freetypeScaler.c 
2017-12-01 16:30:17.838138061 +0100
@@ -38,6 +38,10 @@
 #include FT_SIZES_H
 #include FT_OUTLINE_H
 #include FT_SYNTHESIS_H
+#ifdef IMPROVED_FONT_RENDERING
+#include FT_LCD_FILTER_H
+#include <fontconfig/fontconfig.h>
+#endif
 
 #include "fontscaler.h"
 
@@ -652,6 +656,162 @@
     }
 }
 
+#ifdef IMPROVED_FONT_RENDERING
+typedef struct {
+    FT_Render_Mode ftRenderMode;
+    int ftLoadFlags;
+    FT_LcdFilter ftLcdFilter;
+} RenderingProperties;
+
+static FcPattern* matchedPattern(const FcChar8* family, double ptSize) {
+    /*
+      we will create pattern to find our family and size in
+      fontconfig configuration, and then will return it's
+      properties:
+    */
+    FcPattern* fcPattern = 0;
+    fcPattern = FcPatternCreate();
+    FcValue fcValue;
+    fcValue.type = FcTypeString;
+    fcValue.u.s = family;
+    FcPatternAdd(fcPattern, FC_FAMILY, fcValue, FcTrue);
+    FcPatternAddBool(fcPattern, FC_SCALABLE, FcTrue);
+    FcPatternAddDouble(fcPattern, FC_SIZE, ptSize);
+    // TODO FcPatternAddInteger(pattern, FC_WEIGHT, weight_value);
+    // TODO FcPatternAddInteger(pattern, FC_SLANT, slant_value);
+    // TODO FcPatternAddDouble(pattern, FC_PIXEL_SIZE, size_value);
+    // TODO FcPatternAddInteger(pattern, FC_WIDTH, stretch); 100 in most cases
+    FcConfigSubstitute(0, fcPattern, FcMatchPattern);
+    FcConfigSubstitute(0, fcPattern, FcMatchFont);
+    FcDefaultSubstitute(fcPattern);
+    FcResult res;
+
+    FcPattern *pattern = 0;
+    pattern = FcFontMatch(0, fcPattern, &res);
+    FcPatternDestroy(fcPattern);
+    return pattern;
+}
+
+static void readFontconfig(const FcChar8* family, FTScalerContext *context, 
RenderingProperties* rp) {
+
+    FcPattern *pattern = matchedPattern(family, context->ptsz);
+
+    int ftLoadFalgs = FT_LOAD_DEFAULT;
+    FT_Render_Mode ftRenderMode;
+    FT_LcdFilter ftLcdFilter;
+    char horizontal = 1;
+    FcBool fcAntialias = false, fcBool;
+
+    // If the user has no antialias information set in their fontconfig 
directory
+    // and the font itself does not provide any hints either (which is common),
+    // Fontconfig may not return any antialias hint about the selected font 
since
+    // it does not set any default for this key internally.
+    // Use the antialias hint when it is available but only if antialiasing was
+    // actually requested by the caller.
+    // If antialiasing was requested but Fontconfig states to use no 
antialiasing,
+    // that takes precedence and also modifies the supplied context to account 
for
+    // the change (sets context->aaType to TEXT_AA_OFF as a side-effect in the 
render
+    // mode conditional block down below).
+    if (context->aaType != TEXT_AA_OFF) {
+        if (FcPatternGetBool(pattern, FC_ANTIALIAS, 0, &fcAntialias) != 
FcResultMatch)
+            fcAntialias = true;
+    }
+
+    // render mode:
+    if (fcAntialias) {
+        if (context->aaType == TEXT_AA_ON)
+            ftRenderMode = FT_RENDER_MODE_NORMAL;
+        else {
+            // subpixel order:
+            int subpixel = FC_RGBA_UNKNOWN;
+            FcPatternGetInteger(pattern, FC_RGBA, 0, &subpixel);
+            if (subpixel == FC_RGBA_UNKNOWN)
+                subpixel = FC_RGBA_NONE;
+            switch (subpixel) {
+            case FC_RGBA_NONE:
+                ftRenderMode = FT_RENDER_MODE_NORMAL;
+                break;
+            case FC_RGBA_RGB:
+            case FC_RGBA_BGR:
+                ftRenderMode = FT_RENDER_MODE_LCD;
+                horizontal = 1;
+                break;
+            case FC_RGBA_VRGB:
+            case FC_RGBA_VBGR:
+                ftRenderMode = FT_RENDER_MODE_LCD_V;
+                horizontal = 0;
+                break;
+            default:
+                break;
+            }
+        }
+    } else {
+        ftRenderMode = FT_RENDER_MODE_MONO;
+        context->aaType = TEXT_AA_OFF; // if this was forced through Fontconfig
+   }
+
+    // loading mode:
+    if (!fcAntialias)
+        ftLoadFalgs |= FT_LOAD_TARGET_MONO;
+    else {
+        int hint_style = FC_HINT_NONE;
+        FcPatternGetInteger(pattern, FC_HINT_STYLE, 0, &hint_style);
+        switch (hint_style) {
+        case FC_HINT_NONE:
+            ftLoadFalgs |= FT_LOAD_NO_HINTING;
+            break;
+        case FC_HINT_SLIGHT:
+            ftLoadFalgs |= FT_LOAD_TARGET_LIGHT;
+            break;
+        case FC_HINT_MEDIUM:
+            ftLoadFalgs |= FT_LOAD_TARGET_NORMAL;
+            break;
+        case FC_HINT_FULL:
+            if (fcAntialias)
+                ftLoadFalgs |= FT_LOAD_TARGET_NORMAL;
+            else
+                ftLoadFalgs |= horizontal ? FT_LOAD_TARGET_LCD : 
FT_LOAD_TARGET_LCD_V;
+            break;
+        default:
+            // what else to use as default?
+            ftLoadFalgs |= FT_LOAD_TARGET_NORMAL;
+            break;
+        }
+    }
+
+    // autohinting:
+    if (FcPatternGetBool(pattern, FC_AUTOHINT, 0, &fcBool) == FcResultMatch && 
fcBool)
+        ftLoadFalgs |= FT_LOAD_FORCE_AUTOHINT;
+
+    // LCD filter:
+    int filter = FC_LCD_DEFAULT;
+    FcPatternGetInteger(pattern, FC_LCD_FILTER, 0, &filter);
+    switch (filter) {
+    case FC_LCD_NONE:
+        ftLcdFilter = FT_LCD_FILTER_NONE;
+        break;
+    case FC_LCD_DEFAULT:
+        ftLcdFilter = FT_LCD_FILTER_DEFAULT;
+        break;
+    case FC_LCD_LIGHT:
+        ftLcdFilter = FT_LCD_FILTER_LIGHT;
+        break;
+    case FC_LCD_LEGACY:
+        ftLcdFilter = FT_LCD_FILTER_LEGACY;
+        break;
+    default:
+        // new unknown lcd filter type?! will use default one:
+        ftLcdFilter = FT_LCD_FILTER_DEFAULT;
+        break;
+    }
+
+    FcPatternDestroy(pattern);
+
+    rp->ftRenderMode = ftRenderMode;
+    rp->ftLoadFlags = ftLoadFalgs;
+    rp->ftLcdFilter = ftLcdFilter;
+}
+#endif
 
 /*
  * Class:     sun_font_FreetypeFontScaler
@@ -667,7 +827,9 @@
     UInt16 width, height;
     GlyphInfo *glyphInfo;
     int glyph_index;
+#ifndef IMPROVED_FONT_RENDERING
     int renderFlags = FT_LOAD_RENDER, target;
+#endif
     FT_GlyphSlot ftglyph;
 
     FTScalerContext* context =
@@ -685,6 +847,11 @@
         return ptr_to_jlong(getNullGlyphImage());
     }
 
+#ifdef IMPROVED_FONT_RENDERING
+    RenderingProperties renderingProperties;
+    readFontconfig((const FcChar8 *) scalerInfo->face->family_name,
+                   context, &renderingProperties);
+#else
     /* if algorithmic styling is required then we do not request bitmap */
     if (context->doBold || context->doItalize) {
         renderFlags =  FT_LOAD_DEFAULT;
@@ -707,10 +874,17 @@
         target = FT_LOAD_TARGET_LCD_V;
     }
     renderFlags |= target;
+#endif
 
     glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
 
+#ifdef IMPROVED_FONT_RENDERING
+    FT_Library_SetLcdFilter(scalerInfo->library, 
renderingProperties.ftLcdFilter);
+    error = FT_Load_Glyph(scalerInfo->face, glyphCode, 
renderingProperties.ftLoadFlags);
+#else
     error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderFlags);
+#endif
+
     if (error) {
         //do not destroy scaler yet.
         //this can be problem of particular context (e.g. with bad transform)
@@ -729,9 +903,13 @@
 
     /* generate bitmap if it is not done yet
      e.g. if algorithmic styling is performed and style was added to outline */
+#ifdef IMPROVED_FONT_RENDERING
+    FT_Render_Glyph(ftglyph, renderingProperties.ftRenderMode);
+#else
     if (ftglyph->format == FT_GLYPH_FORMAT_OUTLINE) {
         FT_Render_Glyph(ftglyph, FT_LOAD_TARGET_MODE(target));
     }
+#endif
 
     width  = (UInt16) ftglyph->bitmap.width;
     height = (UInt16) ftglyph->bitmap.rows;
@@ -945,7 +1123,9 @@
 static FT_Outline* getFTOutline(JNIEnv* env, jobject font2D,
         FTScalerContext *context, FTScalerInfo* scalerInfo,
         jint glyphCode, jfloat xpos, jfloat ypos) {
+#ifndef IMPROVED_FONT_RENDERING
     int renderFlags;
+#endif
     int glyph_index;
     FT_Error error;
     FT_GlyphSlot ftglyph;
@@ -960,11 +1140,22 @@
         return NULL;
     }
 
+#ifdef IMPROVED_FONT_RENDERING
+    RenderingProperties renderingProperties;
+    readFontconfig((const FcChar8 *) scalerInfo->face->family_name,
+                   context, &renderingProperties);
+#else
     renderFlags = FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP;
+#endif
 
     glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
 
+#ifdef IMPROVED_FONT_RENDERING
+    error = FT_Load_Glyph(scalerInfo->face, glyphCode, 
renderingProperties.ftLoadFlags);
+#else
     error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderFlags);
+#endif
+
     if (error) {
         return NULL;
     }
++++++ linux_chroot_crash.patch ++++++
--- a/src/hotspot/os/linux/osContainer_linux.cpp        Wed Nov 29 10:30:51 
2017 -0800
+++ b/src/hotspot/os/linux/osContainer_linux.cpp        Thu Nov 30 09:49:45 
2017 -0500
@@ -323,7 +323,12 @@
     }
   }
 
-  if (mntinfo != NULL) fclose(mntinfo);
+  fclose(mntinfo);
+
+  if (memory == NULL || cpuset == NULL || cpu == NULL || cpuacct == NULL) {
+    log_debug(os, container)("Required cgroup subsystems not found");
+    return;
+  }
 
   /*
    * Read /proc/self/cgroup and map host mount point to
@@ -383,12 +388,7 @@
     }
   }
 
-  if (cgroup != NULL) fclose(cgroup);
-
-  if (memory == NULL || cpuset == NULL || cpu == NULL) {
-    log_debug(os, container)("Required cgroup subsystems not found");
-    return;
-  }
+  fclose(cgroup);
 
   // We need to update the amount of physical memory now that
   // command line arguments have been processed.


Reply via email to