本文整理汇总了C++中ShadowLayerParent::AsRefLayerComposite方法的典型用法代码示例。如果您正苦于以下问题:C++ ShadowLayerParent::AsRefLayerComposite方法的具体用法?C++ ShadowLayerParent::AsRefLayerComposite怎么用?C++ ShadowLayerParent::AsRefLayerComposite使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShadowLayerParent
的用法示例。
在下文中一共展示了ShadowLayerParent::AsRefLayerComposite方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resolve
//.........这里部分代码省略.........
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) {
return false;
}
colorLayer->SetColor(specific.get_ColorLayerAttributes().color().value());
colorLayer->SetBounds(specific.get_ColorLayerAttributes().bounds());
break;
}
case Specific::TCanvasLayerAttributes: {
MOZ_LAYERS_LOG(("[ParentSide] canvas layer"));
CanvasLayerComposite* canvasLayer = layerParent->AsCanvasLayerComposite();
if (!canvasLayer) {
return false;
}
canvasLayer->SetFilter(specific.get_CanvasLayerAttributes().filter());
canvasLayer->SetBounds(specific.get_CanvasLayerAttributes().bounds());
break;
}
case Specific::TRefLayerAttributes: {
MOZ_LAYERS_LOG(("[ParentSide] ref layer"));
RefLayerComposite* refLayer = layerParent->AsRefLayerComposite();
if (!refLayer) {
return false;
}
refLayer->SetReferentId(specific.get_RefLayerAttributes().id());
break;
}
case Specific::TImageLayerAttributes: {
MOZ_LAYERS_LOG(("[ParentSide] image layer"));
ImageLayerComposite* imageLayer = layerParent->AsImageLayerComposite();
if (!imageLayer) {
return false;
}
const ImageLayerAttributes& attrs = specific.get_ImageLayerAttributes();
imageLayer->SetFilter(attrs.filter());
imageLayer->SetScaleToSize(attrs.scaleToSize(), attrs.scaleMode());
break;
}
default:
NS_RUNTIMEABORT("not reached");
}
break;
}
case Edit::TOpSetDiagnosticTypes: {
mLayerManager->GetCompositor()->SetDiagnosticTypes(
edit.get_OpSetDiagnosticTypes().diagnostics());
break;
}
// Tree ops
case Edit::TOpSetRoot: {
MOZ_LAYERS_LOG(("[ParentSide] SetRoot"));