equal
deleted
inserted
replaced
332 dy1 = (jfloat)y; |
332 dy1 = (jfloat)y; |
333 dx2 = x + width; |
333 dx2 = x + width; |
334 dy2 = y + height; |
334 dy2 = y + height; |
335 J2dTraceLn4(J2D_TRACE_INFO, |
335 J2dTraceLn4(J2D_TRACE_INFO, |
336 "Destination coordinates dx1 = %f dy1 = %f dx2 = %f dy2 = %f", dx1, dy1, dx2, dy2); |
336 "Destination coordinates dx1 = %f dy1 = %f dx2 = %f dy2 = %f", dx1, dy1, dx2, dy2); |
337 MTLVertexCache_AddGlyphTexture(mtlc, width, height, ginfo); |
337 MTLVertexCache_AddGlyphTexture(mtlc, width, height, ginfo, dstOps); |
338 MTLVertexCache_AddVertexTriangles(dx1, dy1, dx2, dy2); |
338 MTLVertexCache_AddVertexTriangles(dx1, dy1, dx2, dy2); |
339 return JNI_TRUE; |
339 return JNI_TRUE; |
340 } |
340 } |
341 |
341 |
342 static jboolean |
342 static jboolean |
383 glyphMode = MODE_NOT_INITED; |
383 glyphMode = MODE_NOT_INITED; |
384 isCachedDestValid = JNI_FALSE; |
384 isCachedDestValid = JNI_FALSE; |
385 J2dTraceLn1(J2D_TRACE_INFO, "totalGlyphs = %d", totalGlyphs); |
385 J2dTraceLn1(J2D_TRACE_INFO, "totalGlyphs = %d", totalGlyphs); |
386 |
386 |
387 MTLVertexCache_CreateSamplingEncoder(mtlc, dstOps); |
387 MTLVertexCache_CreateSamplingEncoder(mtlc, dstOps); |
|
388 MTLVertexCache_InitVertexCache(); |
388 |
389 |
389 for (glyphCounter = 0; glyphCounter < totalGlyphs; glyphCounter++) { |
390 for (glyphCounter = 0; glyphCounter < totalGlyphs; glyphCounter++) { |
390 J2dTraceLn(J2D_TRACE_INFO, "Entered for loop for glyph list"); |
391 J2dTraceLn(J2D_TRACE_INFO, "Entered for loop for glyph list"); |
391 jint x, y; |
392 jint x, y; |
392 jfloat glyphx, glyphy; |
393 jfloat glyphx, glyphy; |
424 |
425 |
425 //TODO : Right now we have initial texture mapping logic |
426 //TODO : Right now we have initial texture mapping logic |
426 // as we implement LCD, cache usage add new selection condition. |
427 // as we implement LCD, cache usage add new selection condition. |
427 |
428 |
428 if (grayscale) { |
429 if (grayscale) { |
429 MTLVertexCache_InitVertexCache(mtlc); |
|
430 // grayscale or monochrome glyph data |
430 // grayscale or monochrome glyph data |
431 if (ginfo->width <= MTLTR_CACHE_CELL_WIDTH && |
431 if (ginfo->width <= MTLTR_CACHE_CELL_WIDTH && |
432 ginfo->height <= MTLTR_CACHE_CELL_HEIGHT) |
432 ginfo->height <= MTLTR_CACHE_CELL_HEIGHT) |
433 { |
433 { |
434 J2dTraceLn(J2D_TRACE_INFO, "Forced Grayscale no cache"); |
434 J2dTraceLn(J2D_TRACE_INFO, "Forced Grayscale no cache"); |