Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8252706: Enable usage of rowBytesOffset for LCD non cache rendering
  • Loading branch information
jayathirthrao committed Sep 2, 2020
1 parent bcc85aa commit d3bbb05e125d6d2656e49baa38a91a0d3ddad3c0
Showing 1 changed file with 3 additions and 5 deletions.
@@ -607,7 +607,6 @@
static jboolean
MTLTR_DrawLCDGlyphViaCache(MTLContext *mtlc, BMTLSDOps *dstOps,
GlyphInfo *ginfo, jint x, jint y,
jint rowBytesOffset,
jboolean rgbOrder, jint contrast,
id<MTLTexture> dstTexture)
{
@@ -790,9 +789,9 @@

for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
imageData[(i * w * 4) + j * 4] = ginfo->image[(i * w * 3) + j * 3];
imageData[(i * w * 4) + j * 4 + 1] = ginfo->image[(i * w * 3) + j * 3 + 1];
imageData[(i * w * 4) + j * 4 + 2] = ginfo->image[(i * w * 3) + j * 3 + 2];
imageData[(i * w * 4) + j * 4] = ginfo->image[((i * w * 3) + j * 3) + rowBytesOffset];
imageData[(i * w * 4) + j * 4 + 1] = ginfo->image[((i * w * 3) + j * 3 + 1) + rowBytesOffset];
imageData[(i * w * 4) + j * 4 + 2] = ginfo->image[((i * w * 3) + j * 3 + 2) + rowBytesOffset];
imageData[(i * w * 4) + j * 4 + 3] = 0xFF;
}
}
@@ -960,7 +959,6 @@
J2dTraceLn(J2D_TRACE_INFO, "MTLTR_DrawGlyphList LCD cache");
ok = MTLTR_DrawLCDGlyphViaCache(mtlc, dstOps,
ginfo, x, y,
rowBytesOffset,
rgbOrder, lcdContrast,
dstTexture);
} else {

0 comments on commit d3bbb05

Please sign in to comment.