686 * We can only accelerate non-Color MaskFill operations if 687 * all of the following conditions hold true: 688 * - there is an implementation for the given paintState 689 * - the current Paint can be accelerated for this destination 690 * - multitexturing is available (since we need to modulate 691 * the alpha mask texture with the paint texture) 692 * 693 * In all other cases, we return null, in which case the 694 * validation code will choose a more general software-based loop. 695 */ 696 if (!D3DPaints.isValid(sg2d) || 697 !graphicsDevice.isCapPresent(CAPS_MULTITEXTURE)) 698 { 699 return null; 700 } 701 } 702 return super.getMaskFill(sg2d); 703 } 704 705 @Override 706 public boolean copyArea(SunGraphics2D sg2d, 707 int x, int y, int w, int h, int dx, int dy) 708 { 709 if (sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE && 710 sg2d.compositeState < SunGraphics2D.COMP_XOR) 711 { 712 x += sg2d.transX; 713 y += sg2d.transY; 714 715 d3dRenderPipe.copyArea(sg2d, x, y, w, h, dx, dy); 716 717 return true; 718 } 719 return false; 720 } 721 722 @Override 723 public void flush() { 724 D3DRenderQueue rq = D3DRenderQueue.getInstance(); 725 rq.lock(); 726 try { 727 RenderBuffer buf = rq.getBuffer(); 728 rq.ensureCapacityAndAlignment(12, 4); 729 buf.putInt(FLUSH_SURFACE); 730 buf.putLong(getNativeOps()); 731 732 // this call is expected to complete synchronously, so flush now 733 rq.flushNow(); 734 } finally { 735 rq.unlock(); 736 } 737 } 738 739 /** 740 * Disposes the native resources associated with the given D3DSurfaceData | 686 * We can only accelerate non-Color MaskFill operations if 687 * all of the following conditions hold true: 688 * - there is an implementation for the given paintState 689 * - the current Paint can be accelerated for this destination 690 * - multitexturing is available (since we need to modulate 691 * the alpha mask texture with the paint texture) 692 * 693 * In all other cases, we return null, in which case the 694 * validation code will choose a more general software-based loop. 695 */ 696 if (!D3DPaints.isValid(sg2d) || 697 !graphicsDevice.isCapPresent(CAPS_MULTITEXTURE)) 698 { 699 return null; 700 } 701 } 702 return super.getMaskFill(sg2d); 703 } 704 705 @Override 706 public boolean copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, 707 int dx, int dy) { 708 final int state = sg2d.transformState; 709 if (state > SunGraphics2D.TRANSFORM_TRANSLATESCALE 710 || sg2d.compositeState >= SunGraphics2D.COMP_XOR) { 711 return false; 712 } 713 d3dRenderPipe.copyArea(sg2d, x, y, w, h, dx, dy); 714 return true; 715 } 716 717 @Override 718 public void flush() { 719 D3DRenderQueue rq = D3DRenderQueue.getInstance(); 720 rq.lock(); 721 try { 722 RenderBuffer buf = rq.getBuffer(); 723 rq.ensureCapacityAndAlignment(12, 4); 724 buf.putInt(FLUSH_SURFACE); 725 buf.putLong(getNativeOps()); 726 727 // this call is expected to complete synchronously, so flush now 728 rq.flushNow(); 729 } finally { 730 rq.unlock(); 731 } 732 } 733 734 /** 735 * Disposes the native resources associated with the given D3DSurfaceData |