本文整理汇总了Java中sun.java2d.pipe.BufferedContext.validateContext方法的典型用法代码示例。如果您正苦于以下问题:Java BufferedContext.validateContext方法的具体用法?Java BufferedContext.validateContext怎么用?Java BufferedContext.validateContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.java2d.pipe.BufferedContext
的用法示例。
在下文中一共展示了BufferedContext.validateContext方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: update
import sun.java2d.pipe.BufferedContext; //导入方法依赖的package包/类
@Override
protected boolean update(Image bb) {
if (bb instanceof DestSurfaceProvider) {
Surface s = ((DestSurfaceProvider)bb).getDestSurface();
if (s instanceof AccelSurface) {
final int w = bb.getWidth(null);
final int h = bb.getHeight(null);
final boolean arr[] = { false };
final AccelSurface as = (AccelSurface)s;
RenderQueue rq = as.getContext().getRenderQueue();
rq.lock();
try {
BufferedContext.validateContext(as);
rq.flushAndInvokeNow(new Runnable() {
@Override
public void run() {
long psdops = as.getNativeOps();
arr[0] = updateWindowAccel(psdops, w, h);
}
});
} catch (InvalidPipeException e) {
// ignore, false will be returned
} finally {
rq.unlock();
}
return arr[0];
}
}
return super.update(bb);
}
示例2: update
import sun.java2d.pipe.BufferedContext; //导入方法依赖的package包/类
@Override
protected boolean update(Image bb) {
if (bb instanceof DestSurfaceProvider) {
Surface s = ((DestSurfaceProvider)bb).getDestSurface();
if (s instanceof AccelSurface) {
final boolean arr[] = { false };
final AccelSurface as = (AccelSurface)s;
final int w = as.getBounds().width;
final int h = as.getBounds().height;
RenderQueue rq = as.getContext().getRenderQueue();
rq.lock();
try {
BufferedContext.validateContext(as);
rq.flushAndInvokeNow(new Runnable() {
@Override
public void run() {
long psdops = as.getNativeOps();
arr[0] = updateWindowAccel(psdops, w, h);
}
});
} catch (InvalidPipeException e) {
// ignore, false will be returned
} finally {
rq.unlock();
}
return arr[0];
}
}
return super.update(bb);
}
示例3: update
import sun.java2d.pipe.BufferedContext; //导入方法依赖的package包/类
@Override
protected boolean update(Image bb) {
if (bb instanceof DestSurfaceProvider) {
Surface s = ((DestSurfaceProvider)bb).getDestSurface();
if (s instanceof AccelSurface) {
final int w = bb.getWidth(null);
final int h = bb.getHeight(null);
final boolean arr[] = { false };
final AccelSurface as = (AccelSurface)s;
RenderQueue rq = as.getContext().getRenderQueue();
rq.lock();
try {
BufferedContext.validateContext(as);
rq.flushAndInvokeNow(new Runnable() {
public void run() {
long psdops = as.getNativeOps();
arr[0] = updateWindowAccel(psdops, w, h);
}
});
} catch (InvalidPipeException e) {
// ignore, false will be returned
} finally {
rq.unlock();
}
return arr[0];
}
}
return super.update(bb);
}