本文整理汇总了C++中webcore::Settings::setAcceleratedCompositingForCanvasEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ Settings::setAcceleratedCompositingForCanvasEnabled方法的具体用法?C++ Settings::setAcceleratedCompositingForCanvasEnabled怎么用?C++ Settings::setAcceleratedCompositingForCanvasEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webcore::Settings
的用法示例。
在下文中一共展示了Settings::setAcceleratedCompositingForCanvasEnabled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: apply
void QWebSettingsPrivate::apply()
{
if (settings) {
settings->setTextAreasAreResizable(true);
QWebSettingsPrivate* global = QWebSettings::globalSettings()->d;
QString family = fontFamilies.value(QWebSettings::StandardFont,
global->fontFamilies.value(QWebSettings::StandardFont));
settings->setStandardFontFamily(family);
family = fontFamilies.value(QWebSettings::FixedFont,
global->fontFamilies.value(QWebSettings::FixedFont));
settings->setFixedFontFamily(family);
family = fontFamilies.value(QWebSettings::SerifFont,
global->fontFamilies.value(QWebSettings::SerifFont));
settings->setSerifFontFamily(family);
family = fontFamilies.value(QWebSettings::SansSerifFont,
global->fontFamilies.value(QWebSettings::SansSerifFont));
settings->setSansSerifFontFamily(family);
family = fontFamilies.value(QWebSettings::CursiveFont,
global->fontFamilies.value(QWebSettings::CursiveFont));
settings->setCursiveFontFamily(family);
family = fontFamilies.value(QWebSettings::FantasyFont,
global->fontFamilies.value(QWebSettings::FantasyFont));
settings->setFantasyFontFamily(family);
int size = fontSizes.value(QWebSettings::MinimumFontSize,
global->fontSizes.value(QWebSettings::MinimumFontSize));
settings->setMinimumFontSize(size);
size = fontSizes.value(QWebSettings::MinimumLogicalFontSize,
global->fontSizes.value(QWebSettings::MinimumLogicalFontSize));
settings->setMinimumLogicalFontSize(size);
size = fontSizes.value(QWebSettings::DefaultFontSize,
global->fontSizes.value(QWebSettings::DefaultFontSize));
settings->setDefaultFontSize(size);
size = fontSizes.value(QWebSettings::DefaultFixedFontSize,
global->fontSizes.value(QWebSettings::DefaultFixedFontSize));
settings->setDefaultFixedFontSize(size);
bool value = attributes.value(QWebSettings::AutoLoadImages,
global->attributes.value(QWebSettings::AutoLoadImages));
settings->setLoadsImagesAutomatically(value);
value = attributes.value(QWebSettings::DnsPrefetchEnabled,
global->attributes.value(QWebSettings::DnsPrefetchEnabled));
settings->setDNSPrefetchingEnabled(value);
value = attributes.value(QWebSettings::JavascriptEnabled,
global->attributes.value(QWebSettings::JavascriptEnabled));
settings->setScriptEnabled(value);
#if USE(ACCELERATED_COMPOSITING)
value = attributes.value(QWebSettings::AcceleratedCompositingEnabled,
global->attributes.value(QWebSettings::AcceleratedCompositingEnabled));
settings->setAcceleratedCompositingEnabled(value);
settings->setAcceleratedCompositingFor3DTransformsEnabled(value);
settings->setAcceleratedCompositingForAnimationEnabled(value);
#if USE(TEXTURE_MAPPER)
settings->setAcceleratedCompositingForVideoEnabled(false);
settings->setAcceleratedCompositingForPluginsEnabled(false);
#endif
#endif
#if ENABLE(WEBGL)
value = attributes.value(QWebSettings::WebGLEnabled,
global->attributes.value(QWebSettings::WebGLEnabled));
settings->setWebGLEnabled(value);
#if USE(ACCELERATED_COMPOSITING)
settings->setAcceleratedCompositingForCanvasEnabled(value);
#endif
#endif
value = attributes.value(QWebSettings::HyperlinkAuditingEnabled,
global->attributes.value(QWebSettings::HyperlinkAuditingEnabled));
settings->setHyperlinkAuditingEnabled(value);
value = attributes.value(QWebSettings::JavascriptCanOpenWindows,
global->attributes.value(QWebSettings::JavascriptCanOpenWindows));
settings->setJavaScriptCanOpenWindowsAutomatically(value);
value = attributes.value(QWebSettings::JavascriptCanCloseWindows,
global->attributes.value(QWebSettings::JavascriptCanCloseWindows));
settings->setAllowScriptsToCloseWindows(value);
value = attributes.value(QWebSettings::JavaEnabled,
global->attributes.value(QWebSettings::JavaEnabled));
settings->setJavaEnabled(value);
value = attributes.value(QWebSettings::PluginsEnabled,
global->attributes.value(QWebSettings::PluginsEnabled));
settings->setPluginsEnabled(value);
//.........这里部分代码省略.........
示例2: apply
void QWebSettingsPrivate::apply()
{
if (settings) {
settings->setTextAreasAreResizable(true);
QWebSettingsPrivate* global = QWebSettings::globalSettings()->d;
QString family = fontFamilies.value(QWebSettings::StandardFont,
global->fontFamilies.value(QWebSettings::StandardFont));
settings->setStandardFontFamily(family);
family = fontFamilies.value(QWebSettings::FixedFont,
global->fontFamilies.value(QWebSettings::FixedFont));
settings->setFixedFontFamily(family);
family = fontFamilies.value(QWebSettings::SerifFont,
global->fontFamilies.value(QWebSettings::SerifFont));
settings->setSerifFontFamily(family);
family = fontFamilies.value(QWebSettings::SansSerifFont,
global->fontFamilies.value(QWebSettings::SansSerifFont));
settings->setSansSerifFontFamily(family);
family = fontFamilies.value(QWebSettings::CursiveFont,
global->fontFamilies.value(QWebSettings::CursiveFont));
settings->setCursiveFontFamily(family);
family = fontFamilies.value(QWebSettings::FantasyFont,
global->fontFamilies.value(QWebSettings::FantasyFont));
settings->setFantasyFontFamily(family);
int size = fontSizes.value(QWebSettings::MinimumFontSize,
global->fontSizes.value(QWebSettings::MinimumFontSize));
settings->setMinimumFontSize(size);
size = fontSizes.value(QWebSettings::MinimumLogicalFontSize,
global->fontSizes.value(QWebSettings::MinimumLogicalFontSize));
settings->setMinimumLogicalFontSize(size);
size = fontSizes.value(QWebSettings::DefaultFontSize,
global->fontSizes.value(QWebSettings::DefaultFontSize));
settings->setDefaultFontSize(size);
size = fontSizes.value(QWebSettings::DefaultFixedFontSize,
global->fontSizes.value(QWebSettings::DefaultFixedFontSize));
settings->setDefaultFixedFontSize(size);
bool value = attributes.value(QWebSettings::AutoLoadImages,
global->attributes.value(QWebSettings::AutoLoadImages));
settings->setLoadsImagesAutomatically(value);
value = attributes.value(QWebSettings::DnsPrefetchEnabled,
global->attributes.value(QWebSettings::DnsPrefetchEnabled));
settings->setDNSPrefetchingEnabled(value);
value = attributes.value(QWebSettings::JavascriptEnabled,
global->attributes.value(QWebSettings::JavascriptEnabled));
settings->setScriptEnabled(value);
#if USE(ACCELERATED_COMPOSITING)
value = attributes.value(QWebSettings::AcceleratedCompositingEnabled,
global->attributes.value(QWebSettings::AcceleratedCompositingEnabled));
settings->setAcceleratedCompositingEnabled(value);
settings->setAcceleratedCompositingFor3DTransformsEnabled(value);
settings->setAcceleratedCompositingForAnimationEnabled(value);
settings->setAcceleratedCompositingForVideoEnabled(false);
settings->setAcceleratedCompositingForPluginsEnabled(false);
bool showDebugVisuals = qgetenv("WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS") == "1";
settings->setShowDebugBorders(showDebugVisuals);
settings->setShowRepaintCounter(showDebugVisuals);
#endif
#if ENABLE(WEBGL)
value = attributes.value(QWebSettings::WebGLEnabled,
global->attributes.value(QWebSettings::WebGLEnabled));
settings->setWebGLEnabled(value);
#if ENABLE(CSS_SHADERS)
// For now, enable CSS shaders when WebGL is enabled.
settings->setCSSCustomFilterEnabled(value);
#endif
#if USE(ACCELERATED_COMPOSITING)
settings->setAcceleratedCompositingForCanvasEnabled(value);
#endif
#endif
#if ENABLE(WEB_AUDIO)
value = attributes.value(QWebSettings::WebAudioEnabled, global->attributes.value(QWebSettings::WebAudioEnabled));
WebCore::RuntimeEnabledFeatures::setWebAudioEnabled(value);
#endif
value = attributes.value(QWebSettings::CSSRegionsEnabled,
global->attributes.value(QWebSettings::CSSRegionsEnabled));
WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled(value);
value = attributes.value(QWebSettings::CSSCompositingEnabled,
global->attributes.value(QWebSettings::CSSCompositingEnabled));
WebCore::RuntimeEnabledFeatures::setCSSCompositingEnabled(value);
value = attributes.value(QWebSettings::CSSGridLayoutEnabled,
global->attributes.value(QWebSettings::CSSGridLayoutEnabled));
settings->setCSSGridLayoutEnabled(value);
//.........这里部分代码省略.........