mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-9177 Vulkan: Align jbr21 and main (Part 3)
Cleanup blit code.
This commit is contained in:
@@ -24,22 +24,15 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include "jlong.h"
|
||||
#include "VKUtil.h"
|
||||
#include "VKBlitLoops.h"
|
||||
#include "VKSurfaceData.h"
|
||||
#include "VKRenderer.h"
|
||||
#include "GraphicsPrimitiveMgr.h"
|
||||
|
||||
|
||||
#include "Trace.h"
|
||||
#include "VKImage.h"
|
||||
#include "VKBuffer.h"
|
||||
#include "VKImage.h"
|
||||
#include "VKDevice.h"
|
||||
#include "VKTexturePool.h"
|
||||
#include "VKUtil.h"
|
||||
#include "VKRenderer.h"
|
||||
#include "VKSurfaceData.h"
|
||||
#include "VKUtil.h"
|
||||
|
||||
#define SRCTYPE_BITS sun_java2d_vulkan_VKSwToSurfaceBlit_SRCTYPE_BITS
|
||||
|
||||
@@ -100,8 +93,7 @@ void VKBlitLoops_IsoBlit(VKSDOps* srcOps, jint filter,
|
||||
jdouble dx1, jdouble dy1, jdouble dx2, jdouble dy2)
|
||||
{
|
||||
if (srcOps == NULL) {
|
||||
J2dRlsTraceLn(J2D_TRACE_ERROR,
|
||||
"VKBlitLoops_IsoBlit: srcOps is null")
|
||||
J2dRlsTraceLn(J2D_TRACE_ERROR, "VKBlitLoops_IsoBlit: srcOps is null");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -147,7 +139,7 @@ static void VKBlitLoops_FindStageBufferMemoryType(VKMemoryRequirements* requirem
|
||||
|
||||
void VKBlitLoops_Blit(JNIEnv *env,
|
||||
SurfaceDataOps* src,
|
||||
jshort srctype, jint hint,
|
||||
jshort srctype, jint filter,
|
||||
jint sx1, jint sy1,
|
||||
jint sx2, jint sy2,
|
||||
jdouble dx1, jdouble dy1,
|
||||
@@ -237,7 +229,7 @@ void VKBlitLoops_Blit(JNIEnv *env,
|
||||
VKRenderer_RecordBarriers(device->renderer, NULL, NULL, &barrier, &barrierBatch);
|
||||
}
|
||||
|
||||
VKRenderer_DrawImage(image, type.format, type.swizzle, hint, SAMPLER_WRAP_BORDER,
|
||||
VKRenderer_DrawImage(image, type.format, type.swizzle, filter, SAMPLER_WRAP_BORDER,
|
||||
0, 0, (float)sw, (float)sh, (float)dx1, (float)dy1, (float)dx2, (float)dy2);
|
||||
|
||||
VKRenderer_FlushMemory(context->surface, buffer.range);
|
||||
@@ -258,7 +250,7 @@ void VKBlitLoops_Blit(JNIEnv *env,
|
||||
*/
|
||||
void
|
||||
VKBlitLoops_SurfaceToSwBlit(JNIEnv *env,
|
||||
VKSDOps* src, SurfaceDataOps* dst, jint dsttype,
|
||||
VKSDOps* src, SurfaceDataOps* dst,
|
||||
jint srcx, jint srcy, jint dstx, jint dsty,
|
||||
jint width, jint height)
|
||||
{
|
||||
|
||||
@@ -28,10 +28,8 @@
|
||||
#define VKBlitLoops_h_Included
|
||||
|
||||
#include "jni.h"
|
||||
#include "sun_java2d_vulkan_VKBlitLoops.h"
|
||||
#include "VKTypes.h"
|
||||
#include "SurfaceData.h"
|
||||
|
||||
#include "VKTypes.h"
|
||||
|
||||
void VKBlitLoops_IsoBlit(VKSDOps* srcOps,
|
||||
jint filter,
|
||||
@@ -42,7 +40,7 @@ void VKBlitLoops_IsoBlit(VKSDOps* srcOps,
|
||||
|
||||
void VKBlitLoops_Blit(JNIEnv *env,
|
||||
SurfaceDataOps* src,
|
||||
jshort srctype, jint hint,
|
||||
jshort srctype, jint filter,
|
||||
jint sx1, jint sy1,
|
||||
jint sx2, jint sy2,
|
||||
jdouble dx1, jdouble dy1,
|
||||
@@ -50,7 +48,7 @@ void VKBlitLoops_Blit(JNIEnv *env,
|
||||
|
||||
void
|
||||
VKBlitLoops_SurfaceToSwBlit(JNIEnv *env,
|
||||
VKSDOps* src, SurfaceDataOps* dst, jint dsttype,
|
||||
VKSDOps* src, SurfaceDataOps* dst,
|
||||
jint srcx, jint srcy, jint dstx, jint dsty,
|
||||
jint width, jint height);
|
||||
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
#ifndef VKBuffer_h_Included
|
||||
#define VKBuffer_h_Included
|
||||
|
||||
#include "VKTypes.h"
|
||||
#include "VKAllocator.h"
|
||||
#include "VKUtil.h"
|
||||
|
||||
struct VKBuffer {
|
||||
VkBuffer handle;
|
||||
|
||||
@@ -378,7 +378,7 @@ JNIEXPORT void JNICALL Java_sun_java2d_vulkan_VKRenderQueue_flushBuffer
|
||||
J2dRlsTraceLn8(J2D_TRACE_VERBOSE,
|
||||
"VKRenderQueue_flushBuffer: SURFACE_TO_SW_BLIT (%p) (%d %d %d %d) -> (%p) (%d %d)",
|
||||
src, sx, sy, w, h, dst, dx, dy);
|
||||
VKBlitLoops_SurfaceToSwBlit(env, src, dst, dsttype, sx, sy, dx, dy, w, h);
|
||||
VKBlitLoops_SurfaceToSwBlit(env, src, dst, sx, sy, dx, dy, w, h);
|
||||
}
|
||||
break;
|
||||
case sun_java2d_pipe_BufferedOpCodes_MASK_FILL:
|
||||
|
||||
Reference in New Issue
Block a user