/* * Class: sun_awt_motif_X11GIFAcceleratorLoops * Method: LUTxparToIndexed * Signature: (Lsun/awt/image/ImageData;Lsun/awt/image/ImageData;II)V */ JNIEXPORT void JNICALL Java_sun_awt_motif_X11GIFAcceleratorLoops_LUTxparToIndexed( JNIEnv *env, jobject joSelf, jobject srcImage, jobject dstImage, jint width, jint height) { ScreenData* pScreen = (ScreenData *)getPlatformInfoFromImageData(env, dstImage); if (!pScreen) { return; } if (!cubemapArray) { return; } if (pScreen->method == METHOD_XIMAGE) { Region *regionP = &(pScreen->region); int x, y; int rectx = 0; int recty = 0; int newrun = 1; getViewOriginFromImageData(env, dstImage, &x, &y); pScreen->fUsingRegion = 1; #undef DECLARE_COLORDATA #define DECLARE_COLORDATA ColorData *cData = dstLockInfo.colorData #undef DECLARE_SRC_LUT #define DECLARE_SRC_LUT unsigned int *srcLut = srcLockInfo.lockedLut #undef DECLARE_DITHER #define DECLARE_DITHER DECLARE_BIDX_DITHER #define INNER_LOOP( INNER_COUNT, SRC_TYPE, SRC_BUMP, DST_TYPE, DST_BUMP) \ INNER_LOOP_XPAR_REGION_BIDX( INNER_COUNT, SRC_TYPE, SRC_BUMP,\ DST_TYPE, DST_BUMP) INVOKE_BLIT(ByteIndexed, char, ByteIndexed, char, 1, 1, 1); if (!newrun) { if (*regionP != NULL) { AddToRegion(regionP, rectx, recty, x, y, width, width-1, height-1); } } if (*regionP == NULL) { pScreen->fUsingRegion = 0; } #undef INNER_LOOP #undef DECLARE_DITHER #define DECLARE_DITHER DEFAULT_DECLARE_DITHER #undef DECLARE_SRC_LUT #define DECLARE_SRC_LUT DEFAULT_SRC_LUT #undef DECLARE_COLORDATA #define DECLARE_COLORDATA DEFAULT_COLORDATA } else {
bool Unit::RegisterRegion() { uint16 new_region_x = GetNewRegionX(), new_region_z = GetNewRegionZ(), old_region_x = GetRegionX(), old_region_z = GetRegionZ(); if (GetRegion() == nullptr || (old_region_x == new_region_x && old_region_z == new_region_z)) return false; AddToRegion(new_region_x, new_region_z); RemoveRegion(old_region_x - new_region_x, old_region_z - new_region_z); InsertRegion(new_region_x - old_region_x, new_region_z - old_region_z); return true; }