本文整理汇总了C++中ShadowLayerParent::AsThebesLayerComposite方法的典型用法代码示例。如果您正苦于以下问题:C++ ShadowLayerParent::AsThebesLayerComposite方法的具体用法?C++ ShadowLayerParent::AsThebesLayerComposite怎么用?C++ ShadowLayerParent::AsThebesLayerComposite使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShadowLayerParent
的用法示例。
在下文中一共展示了ShadowLayerParent::AsThebesLayerComposite方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resolve
//.........这里部分代码省略.........
layer->SetOpacity(common.opacity());
layer->SetClipRect(common.useClipRect() ? &common.clipRect() : nullptr);
layer->SetBaseTransform(common.transform().value());
layer->SetPostScale(common.postXScale(), common.postYScale());
layer->SetIsFixedPosition(common.isFixedPosition());
layer->SetFixedPositionAnchor(common.fixedPositionAnchor());
layer->SetFixedPositionMargins(common.fixedPositionMargin());
if (common.isStickyPosition()) {
layer->SetStickyPositionData(common.stickyScrollContainerId(),
common.stickyScrollRangeOuter(),
common.stickyScrollRangeInner());
}
layer->SetScrollbarData(common.scrollbarTargetContainerId(),
static_cast<Layer::ScrollDirection>(common.scrollbarDirection()));
layer->SetMixBlendMode((gfx::CompositionOp)common.mixBlendMode());
layer->SetForceIsolatedGroup(common.forceIsolatedGroup());
if (PLayerParent* maskLayer = common.maskLayerParent()) {
layer->SetMaskLayer(cast(maskLayer)->AsLayer());
} else {
layer->SetMaskLayer(nullptr);
}
layer->SetAnimations(common.animations());
layer->SetInvalidRegion(common.invalidRegion());
typedef SpecificLayerAttributes Specific;
const SpecificLayerAttributes& specific = attrs.specific();
switch (specific.type()) {
case Specific::Tnull_t:
break;
case Specific::TThebesLayerAttributes: {
MOZ_LAYERS_LOG(("[ParentSide] thebes layer"));
ThebesLayerComposite* thebesLayer = layerParent->AsThebesLayerComposite();
if (!thebesLayer) {
return false;
}
const ThebesLayerAttributes& attrs =
specific.get_ThebesLayerAttributes();
thebesLayer->SetValidRegion(attrs.validRegion());
break;
}
case Specific::TContainerLayerAttributes: {
MOZ_LAYERS_LOG(("[ParentSide] container layer"));
ContainerLayerComposite* containerLayer = layerParent->AsContainerLayerComposite();
if (!containerLayer) {
return false;
}
const ContainerLayerAttributes& attrs =
specific.get_ContainerLayerAttributes();
containerLayer->SetFrameMetrics(attrs.metrics());
containerLayer->SetScrollHandoffParentId(attrs.scrollParentId());
containerLayer->SetPreScale(attrs.preXScale(), attrs.preYScale());
containerLayer->SetInheritedScale(attrs.inheritedXScale(), attrs.inheritedYScale());
containerLayer->SetBackgroundColor(attrs.backgroundColor().value());
containerLayer->SetContentDescription(attrs.contentDescription());
break;
}
case Specific::TColorLayerAttributes: {
MOZ_LAYERS_LOG(("[ParentSide] color layer"));
ColorLayerComposite* colorLayer = layerParent->AsColorLayerComposite();
if (!colorLayer) {