/* 2943 */ int rectXend = bounds.x + bounds.width - 1;
/* 2944 */ int rectYend = bounds.y + bounds.height - 1;
/* 2945 */ int endX = XToTileX(rectXend);
/* 2946 */ int endY = YToTileY(rectYend);
/* */
/* 2951 */ DataBufferShort dstDB = (DataBufferShort)dstRaster.getDataBuffer();
/* 2952 */ short[] dst = dstDB.getData();
/* 2953 */ int dstPS = dstSM.getPixelStride();
/* 2954 */ int dstSS = dstSM.getScanlineStride();
/* */
/* 2956 */ boolean tileParamsSet = false;
/* 2957 */ ComponentSampleModel srcSM = null;
/* 2958 */ int srcPS = 0; int srcSS = 0;
/* */
/* 2962 */ for (int y = startY; y <= endY; y++)
/* 2963 */ for (int x = startX; x <= endX; x++) {
/* 2964 */ Raster tile = getTile(x, y);
/* 2965 */ if (tile != null)
/* */ {
/* 2973 */ if (!tileParamsSet)
/* */ {
/* 2978 */ srcSM = (ComponentSampleModel)tile.getSampleModel();
/* 2979 */ srcPS = srcSM.getPixelStride();
/* 2980 */ srcSS = srcSM.getScanlineStride();
/* 2981 */ tileParamsSet = true;
/* */ }
/* */
/* 2988 */ int yOrg = y * this.tileHeight + this.tileGridYOffset;
/* 2989 */ int srcY1 = yOrg;
/* 2990 */ int srcY2 = srcY1 + this.tileHeight - 1;
/* 2991 */ if (bounds.y > srcY1) srcY1 = bounds.y;
/* 2992 */ if (rectYend < srcY2) srcY2 = rectYend;
/* 2993 */ int srcH = srcY2 - srcY1 + 1;
/* */
/* 2995 */ int xOrg = x * this.tileWidth + this.tileGridXOffset;
/* 2996 */ int srcX1 = xOrg;
/* 2997 */ int srcX2 = srcX1 + this.tileWidth - 1;
/* 2998 */ if (bounds.x > srcX1) srcX1 = bounds.x;
/* 2999 */ if (rectXend < srcX2) srcX2 = rectXend;
/* 3000 */ int srcW = srcX2 - srcX1 + 1;
/* */
/* 3002 */ int dstX = srcX1 - bounds.x;
/* 3003 */ int dstY = srcY1 - bounds.y;
/* */
/* 3006 */ DataBufferShort srcDB = (DataBufferShort)tile.getDataBuffer();
/* 3007 */ short[] src = srcDB.getData();
/* */
/* 3009 */ int nsamps = srcW * srcPS;
/* 3010 */ boolean useArrayCopy = nsamps >= 64;
/* */
/* 3012 */ int ySrcIdx = (srcY1 - yOrg) * srcSS + (srcX1 - xOrg) * srcPS;