本文整理汇总了Java中sun.awt.Win32GraphicsEnvironment.isDWMCompositionEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java Win32GraphicsEnvironment.isDWMCompositionEnabled方法的具体用法?Java Win32GraphicsEnvironment.isDWMCompositionEnabled怎么用?Java Win32GraphicsEnvironment.isDWMCompositionEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.awt.Win32GraphicsEnvironment
的用法示例。
在下文中一共展示了Win32GraphicsEnvironment.isDWMCompositionEnabled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isAccelCapable
import sun.awt.Win32GraphicsEnvironment; //导入方法依赖的package包/类
@Override
public boolean isAccelCapable() {
// REMIND: Temp workaround for issues with using HW acceleration
// in the browser on Vista when DWM is enabled
// Note: isDWMCompositionEnabled is only relevant on Vista, returns
// false on other systems.
return !Win32GraphicsEnvironment.isDWMCompositionEnabled();
}
示例2: useBufferPerWindow
import sun.awt.Win32GraphicsEnvironment; //导入方法依赖的package包/类
/**
* There are two reasons why we don't use buffer per window when
* Vista's DWM (aka Aero) is enabled:
* - since with DWM all windows are already double-buffered, the application
* doesn't get expose events so we don't get to use our true back-buffer,
* wasting memory and performance (this is valid for both d3d and gdi
* pipelines)
* - in some cases with buffer per window enabled it is possible for the
* paint manager to redirect rendering to the screen for some operations
* (like copyArea), and since bpw uses its own BufferStrategy the
* d3d onscreen rendering support is disabled and rendering goes through
* GDI. This doesn't work well with Vista's DWM since one
* can not perform GDI and D3D operations on the same surface
* (see 6630702 for more info)
*
* Note: even though DWM composition state can change during the lifetime
* of the application it is a rare event, and it is more often that it
* is temporarily disabled (because of some app) than it is getting
* permanently enabled so we can live with this approach without the
* complexity of dwm state listeners and such. This can be revisited if
* proved otherwise.
*/
@Override
public boolean useBufferPerWindow() {
return !Win32GraphicsEnvironment.isDWMCompositionEnabled();
}