当前位置: 首页>>代码示例>>Java>>正文


Java Win32GraphicsEnvironment.isDWMCompositionEnabled方法代码示例

本文整理汇总了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();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:WEmbeddedFramePeer.java

示例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();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:WToolkit.java


注:本文中的sun.awt.Win32GraphicsEnvironment.isDWMCompositionEnabled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。