412 return
413 graphicsConfig.isCapPresent(CAPS_EXT_LCD_SHADER) &&
414 sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY &&
415 sg2d.paintState <= SunGraphics2D.PAINT_OPAQUECOLOR &&
416 sg2d.surfaceData.getTransparency() == Transparency.OPAQUE;
417 }
418
419 public void validatePipe(SunGraphics2D sg2d) {
420 TextPipe textpipe;
421 boolean validated = false;
422
423 // OGLTextRenderer handles both AA and non-AA text, but
424 // only works with the following modes:
425 // (Note: For LCD text we only enter this code path if
426 // canRenderLCDText() has already validated that the mode is
427 // CompositeType.SrcNoEa (opaque color), which will be subsumed
428 // by the CompositeType.SrcNoEa (any color) test below.)
429
430 if (/* CompositeType.SrcNoEa (any color) */
431 (sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY &&
432 sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR) ||
433
434 /* CompositeType.SrcOver (any color) */
435 (sg2d.compositeState == SunGraphics2D.COMP_ALPHA &&
436 sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR &&
437 (((AlphaComposite)sg2d.composite).getRule() ==
438 AlphaComposite.SRC_OVER)) ||
439
440 /* CompositeType.Xor (any color) */
441 (sg2d.compositeState == SunGraphics2D.COMP_XOR &&
442 sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR))
443 {
444 textpipe = oglTextPipe;
445 } else {
446 // do this to initialize textpipe correctly; we will attempt
447 // to override the non-text pipes below
448 super.validatePipe(sg2d);
449 textpipe = sg2d.textpipe;
450 validated = true;
451 }
452
|
412 return
413 graphicsConfig.isCapPresent(CAPS_EXT_LCD_SHADER) &&
414 sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY &&
415 sg2d.paintState <= SunGraphics2D.PAINT_OPAQUECOLOR &&
416 sg2d.surfaceData.getTransparency() == Transparency.OPAQUE;
417 }
418
419 public void validatePipe(SunGraphics2D sg2d) {
420 TextPipe textpipe;
421 boolean validated = false;
422
423 // OGLTextRenderer handles both AA and non-AA text, but
424 // only works with the following modes:
425 // (Note: For LCD text we only enter this code path if
426 // canRenderLCDText() has already validated that the mode is
427 // CompositeType.SrcNoEa (opaque color), which will be subsumed
428 // by the CompositeType.SrcNoEa (any color) test below.)
429
430 if (/* CompositeType.SrcNoEa (any color) */
431 (sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY &&
432 sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR &&
433 ((AlphaComposite)sg2d.composite).getRule() ==
434 AlphaComposite.SRC &&
435 ((AlphaComposite)sg2d.composite).getAlpha() == 1.0f) ||
436
437 /* CompositeType.SrcOver (any color) */
438 (sg2d.compositeState == SunGraphics2D.COMP_ALPHA &&
439 sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR &&
440 (((AlphaComposite)sg2d.composite).getRule() ==
441 AlphaComposite.SRC_OVER)) ||
442
443 /* CompositeType.Xor (any color) */
444 (sg2d.compositeState == SunGraphics2D.COMP_XOR &&
445 sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR))
446 {
447 textpipe = oglTextPipe;
448 } else {
449 // do this to initialize textpipe correctly; we will attempt
450 // to override the non-text pipes below
451 super.validatePipe(sg2d);
452 textpipe = sg2d.textpipe;
453 validated = true;
454 }
455
|