Skip to content

Commit

Permalink
Restore TWR
Browse files Browse the repository at this point in the history
  • Loading branch information
mcimadamore committed Oct 4, 2023
1 parent 25471af commit 53da3cc
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions src/java.desktop/share/classes/sun/font/HBShaper.java
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ static void shape(
ScopedValue.where(scopedVars, vars)
.run(() -> {

Arena arena = Arena.ofConfined();
try (Arena arena = Arena.ofConfined()) {

float startX = (float)startPt.getX();
float startY = (float)startPt.getY();
Expand All @@ -455,18 +455,15 @@ static void shape(
MemorySegment chars = arena.allocateArray(JAVA_CHAR, text.length);
MemorySegment.copy(text, 0, chars, JAVA_CHAR, 0, text.length);

try {
/*int ret =*/
jdk_hb_shape_handle.invokeExact(
ptSize, matrix, hbface, chars, text.length,
script, offset, limit,
baseIndex, startX, startY, flags, slot,
font_funcs_pointer,
store_layout_results_stub);
} catch (Throwable ex) {
ex.printStackTrace();
}
arena.close();
/*int ret =*/ jdk_hb_shape_handle.invokeExact(
ptSize, matrix, hbface, chars, text.length,
script, offset, limit,
baseIndex, startX, startY, flags, slot,
font_funcs_pointer,
store_layout_results_stub);
} catch (Throwable t) {
t.printStackTrace();
}
});
}

Expand Down

0 comments on commit 53da3cc

Please sign in to comment.