private static void enableConvolveOp(RenderQueue rq,
SurfaceData srcData,
ConvolveOp cop)
{
// assert rq.lock.isHeldByCurrentThread();
boolean edgeZero =
cop.getEdgeCondition() == ConvolveOp.EDGE_ZERO_FILL;
Kernel kernel = cop.getKernel();
int kernelWidth = kernel.getWidth();
int kernelHeight = kernel.getHeight();
int kernelSize = kernelWidth * kernelHeight;
int sizeofFloat = 4;
int totalBytesRequired = 4 + 8 + 12 + (kernelSize * sizeofFloat);
RenderBuffer buf = rq.getBuffer();
rq.ensureCapacityAndAlignment(totalBytesRequired, 4);
buf.putInt(ENABLE_CONVOLVE_OP);
buf.putLong(srcData.getNativeOps());
buf.putInt(edgeZero ? 1 : 0);
buf.putInt(kernelWidth);
buf.putInt(kernelHeight);
buf.put(kernel.getKernelData(null));
}
BufferedBufImgOps.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:openjdk-jdk10
作者:
评论列表
文章目录