什么是 sun.awt.image.BufImgSurfaceData?

试图追踪潜在的与图形相关的性能问题,通过 JVisualVM 执行了堆转储。

在 Eclipse Memory Analyzer 中打开转储,其中一个“问题嫌疑人”显示如下:

http://img4.mukewang.com/645b62c5000174ef06300278.jpg

搜索代码,没有直接引用正在使用的 BufImgSurfaceData。进行谷歌搜索也不会透露有关该课程的太多信息。

在哪里可以找到有关此类的信息?


慕森王
浏览 111回答 1
1回答

慕沐林林

在哪里可以找到有关此类的信息?通过阅读 OpenJDK 源代码……任何人都可以免费下载。(以下内容来自Java 8源码。)该类的注释最少,但它扩展了sun.java2d.SurfaceDatawhose javadoc 注释块这样说:/**&nbsp;* This class provides various pieces of information relevant to a&nbsp;* particular drawing surface.&nbsp; The information obtained from this&nbsp;* object describes the pixels of a particular instance of a drawing&nbsp;* surface and can only be shared among the various graphics objects&nbsp;* that target the same BufferedImage or the same screen Component.&nbsp;* <p>&nbsp;* Each SurfaceData object holds a StateTrackableDelegate object&nbsp;* which tracks both changes to the content of the pixels of this&nbsp;* surface and changes to the overall state of the pixels - such&nbsp;* as becoming invalid or losing the surface.&nbsp; The delegate is&nbsp;* marked "dirty" whenever the setSurfaceLost() or invalidate()&nbsp;* methods are called and should also be marked "dirty" by the&nbsp;* rendering pipelines whenever they modify the pixels of this&nbsp;* SurfaceData.&nbsp;* <p>&nbsp;* If you get a StateTracker from a SurfaceData and it reports&nbsp;* that it is still "current", then you can trust that the pixels&nbsp;* have not changed and that the SurfaceData is still valid and&nbsp;* has not lost its underlying storage (surfaceLost) since you&nbsp;* retrieved the tracker.&nbsp;*/由此看来,似乎sun.awt.image.BufImgSurfaceData涉及到对一个BufferedImage对象进行绘制操作,以及相关联的东西。(这是相当高的水平,但它应该足以让您弄清楚这是否与您的性能问题相关。我怀疑它不是,除非有很多对象的“流失”。BufferedImage)
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java