Skip to content
Permalink
Browse files

8243253: Disable incomplete cached text rendering for LCD

  • Loading branch information
jayathirthrao committed Apr 21, 2020
1 parent b5c1be0 commit 4ffc9752bcc3edbcf229e65d3a29cca388dd0f57
Showing with 7 additions and 8 deletions.
  1. +7 −8 src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLTextRenderer.m
@@ -893,8 +893,6 @@

J2dTraceLn2(J2D_TRACE_INFO, "Glyph width = %d height = %d", ginfo->width, ginfo->height);
J2dTraceLn1(J2D_TRACE_INFO, "rowBytes = %d", ginfo->rowBytes);
//TODO : Right now we have initial texture mapping logic
// as we implement LCD, cache usage add new selection condition.
if (grayscale) {
// grayscale or monochrome glyph data
if (ginfo->width <= MTLTR_CACHE_CELL_WIDTH &&
@@ -920,17 +918,18 @@
}
}

// TODO: Implement LCD text rendering
if (rowBytesOffset == 0 &&
ginfo->width <= MTLTR_CACHE_CELL_WIDTH &&
ginfo->height <= MTLTR_CACHE_CELL_HEIGHT)
{
// Start using MTLTR_DrawLCDGlyphViaCache() once we have
// working glyphCacheLCD
J2dTraceLn(J2D_TRACE_INFO, "MTLTR_DrawGlyphList LCD cache -- :TODO");
ok = MTLTR_DrawLCDGlyphViaCache(mtlc, dstOps,
ginfo, x, y,
glyphCounter, totalGlyphs,
rgbOrder, lcdContrast,
dstTexture);
ok = MTLTR_DrawLCDGlyphNoCache(mtlc, dstOps,
ginfo, x, y,
rowBytesOffset,
rgbOrder, lcdContrast,
dstTexture);
} else {
J2dTraceLn(J2D_TRACE_INFO, "MTLTR_DrawGlyphList LCD no cache");
ok = MTLTR_DrawLCDGlyphNoCache(mtlc, dstOps,

0 comments on commit 4ffc975

Please sign in to comment.