Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit

Permalink
8252706: Enable usage of rowBytesOffset for LCD non cache rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
jayathirthrao committed Sep 2, 2020
1 parent bcc85aa commit d3bbb05
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit d3bbb05

Please sign in to comment.