示例#1
0
 /**
  * Packs the given parameters into a single int value in order to save space on the rendering
  * queue. Note that most of these parameters are only used for rendering LCD-optimized text, but
  * conditionalizing this work wouldn't make any impact on performance, so we will pack those
  * parameters even in the non-LCD case.
  */
 private static int createPackedParams(SunGraphics2D sg2d, GlyphList gl) {
   return (((gl.usePositions() ? 1 : 0) << OFFSET_POSITIONS)
       | ((gl.isSubPixPos() ? 1 : 0) << OFFSET_SUBPIXPOS)
       | ((gl.isRGBOrder() ? 1 : 0) << OFFSET_RGBORDER)
       | ((sg2d.lcdTextContrast & 0xff) << OFFSET_CONTRAST));
 }