I'm having a flicker problem in a Java applet in Safari (Mac). However, it's not the usual double buffering problem.

我在Safari(Mac)的Java小程序中遇到闪烁问题。但是,这不是通常的双缓冲问题。

I have isolated it down to one single drawImage call (no redundant repaint, no clear is called), which gives a white flicker before painting the image but not on every repaint. In fact, I measured the duration of the drawImage call, which is normally about 1ms, but up to 30ms about every 5th time paint is called, which is when it flickers. Repaints are triggered when I drag a component or when the window is scrolled.

我将它分离为一个单独的drawImage调用(没有冗余重绘,没有调用clear),在绘制图像之前会产生白色闪烁,但不会在每次重绘时产生。实际上,我测量了drawImage调用的持续时间,通常大约是1ms,但是大约每隔5次调用一次,最多30ms,这就是它闪烁的时间。拖动组件或滚动窗口时会触发重绘。

Is this a bug in the java implementation on OSX, and is there a fix for it?

这是OSX上java实现中的一个错误,是否有修复方法?

2 个解决方案

#1


You give very small information. That is difficult to answer.

你提供的信息很少。这很难回答。

Do you recreate the Image before you paint it? Then you can buffer it or use an media tracker.

在绘制之前重新创建图像吗?然后你可以缓冲它或使用媒体跟踪器。

If you use an old Java version then update it. The old versions for OSX are very buggy.

如果您使用旧的Java版本,则更新它。 OSX的旧版本非常多。

更多相关文章

  1. 字体图标的引入和通过媒体查询改变导航样式
  2. HTML样式和常用选择器
  3. 字体图标的引用和自定义样式/媒体查询的使用
  4. 数据库的CURD操作、PDO本质与原理的学习
  5. CSS之伪类选择器和简单盒子简单案例
  6. 伪类选择器与盒模型常用属性
  7. 伪类选择器-结构伪类、根据位置选择匹配
  8. 7.4——常用标签与应用场景之表格与单元格
  9. css伪类选择器和盒模型

随机推荐

  1. 无线标记语言(WML)基础之WMLScript 基础
  2. 使用Spry轻松将XML数据显示到HTML页
  3. 用Asp与XML实现交互的一个实例源码
  4. 不同浏览器对XML的解析是不同的
  5. cdata标签如何使用
  6. xml中常见的四种解析方式是什么?
  7. 关于html嵌入xml数据岛如何穿过树形结构
  8. XPath是什么
  9. 四种使用dom4j读取xml文件的方式
  10. xml没有代码提示的解决方法