• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ UnderlyingValueOwner类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中UnderlyingValueOwner的典型用法代码示例。如果您正苦于以下问题:C++ UnderlyingValueOwner类的具体用法?C++ UnderlyingValueOwner怎么用?C++ UnderlyingValueOwner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了UnderlyingValueOwner类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: composite

void CSSBasicShapeInterpolationType::composite(UnderlyingValueOwner& underlyingValueOwner, double underlyingFraction, const InterpolationValue& value, double interpolationFraction) const
{
    if (!BasicShapeInterpolationFunctions::shapesAreCompatible(*underlyingValueOwner.value().nonInterpolableValue, *value.nonInterpolableValue)) {
        underlyingValueOwner.set(*this, value);
        return;
    }

    underlyingValueOwner.mutableValue().interpolableValue->scaleAndAdd(underlyingFraction, *value.interpolableValue);
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:9,代码来源:CSSBasicShapeInterpolationType.cpp


示例2: composite

void CSSClipInterpolationType::composite(UnderlyingValueOwner& underlyingValueOwner, double underlyingFraction, const InterpolationValue& value, double interpolationFraction) const
{
    const ClipAutos& underlyingAutos = toCSSClipNonInterpolableValue(*underlyingValueOwner.value().nonInterpolableValue).clipAutos();
    const ClipAutos& autos = toCSSClipNonInterpolableValue(*value.nonInterpolableValue).clipAutos();
    if (underlyingAutos == autos)
        underlyingValueOwner.mutableValue().interpolableValue->scaleAndAdd(underlyingFraction, *value.interpolableValue);
    else
        underlyingValueOwner.set(*this, value);
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:9,代码来源:CSSClipInterpolationType.cpp


示例3: composite

void CSSMotionRotationInterpolationType::composite(UnderlyingValueOwner& underlyingValueOwner, double underlyingFraction, const InterpolationValue& value) const
{
    const MotionRotationType& underlyingType = toCSSMotionRotationNonInterpolableValue(*underlyingValueOwner.value().nonInterpolableValue).rotationType();
    const MotionRotationType& rotationType = toCSSMotionRotationNonInterpolableValue(*value.nonInterpolableValue).rotationType();
    if (underlyingType == rotationType)
        underlyingValueOwner.mutableValue().interpolableValue->scaleAndAdd(underlyingFraction, *value.interpolableValue);
    else
        underlyingValueOwner.set(*this, value);
}
开发者ID:astojilj,项目名称:chromium-crosswalk,代码行数:9,代码来源:CSSMotionRotationInterpolationType.cpp


示例4: composite

void CSSImageSliceInterpolationType::composite(UnderlyingValueOwner& underlyingValueOwner, double underlyingFraction, const InterpolationValue& value, double interpolationFraction) const
{
    const SliceTypes& underlyingTypes = toCSSImageSliceNonInterpolableValue(*underlyingValueOwner.value().nonInterpolableValue).types();
    const SliceTypes& types = toCSSImageSliceNonInterpolableValue(*value.nonInterpolableValue).types();

    if (underlyingTypes == types)
        underlyingValueOwner.mutableValue().interpolableValue->scaleAndAdd(underlyingFraction, *value.interpolableValue);
    else
        underlyingValueOwner.set(*this, value);
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:10,代码来源:CSSImageSliceInterpolationType.cpp


示例5: DCHECK

void InvalidatableInterpolation::applyStack(
    const ActiveInterpolations& interpolations,
    InterpolationEnvironment& environment) {
  DCHECK(!interpolations.isEmpty());
  size_t startingIndex = 0;

  // Compute the underlying value to composite onto.
  UnderlyingValueOwner underlyingValueOwner;
  const InvalidatableInterpolation& firstInterpolation =
      toInvalidatableInterpolation(*interpolations.at(startingIndex));
  if (firstInterpolation.dependsOnUnderlyingValue()) {
    underlyingValueOwner.set(
        firstInterpolation.maybeConvertUnderlyingValue(environment));
  } else {
    const TypedInterpolationValue* firstValue =
        firstInterpolation.ensureValidInterpolation(environment,
                                                    underlyingValueOwner);
    // Fast path for replace interpolations that are the only one to apply.
    if (interpolations.size() == 1) {
      if (firstValue) {
        firstInterpolation.setFlagIfInheritUsed(environment);
        firstValue->type().apply(firstValue->interpolableValue(),
                                 firstValue->getNonInterpolableValue(),
                                 environment);
      }
      return;
    }
    underlyingValueOwner.set(firstValue);
    startingIndex++;
  }

  // Composite interpolations onto the underlying value.
  bool shouldApply = false;
  for (size_t i = startingIndex; i < interpolations.size(); i++) {
    const InvalidatableInterpolation& currentInterpolation =
        toInvalidatableInterpolation(*interpolations.at(i));
    DCHECK(currentInterpolation.dependsOnUnderlyingValue());
    const TypedInterpolationValue* currentValue =
        currentInterpolation.ensureValidInterpolation(environment,
                                                      underlyingValueOwner);
    if (!currentValue)
      continue;
    shouldApply = true;
    currentInterpolation.setFlagIfInheritUsed(environment);
    double underlyingFraction = currentInterpolation.underlyingFraction();
    if (underlyingFraction == 0 || !underlyingValueOwner ||
        underlyingValueOwner.type() != currentValue->type())
      underlyingValueOwner.set(currentValue);
    else
      currentValue->type().composite(underlyingValueOwner, underlyingFraction,
                                     currentValue->value(),
                                     currentInterpolation.m_currentFraction);
  }

  if (shouldApply && underlyingValueOwner)
    underlyingValueOwner.type().apply(
        *underlyingValueOwner.value().interpolableValue,
        underlyingValueOwner.value().nonInterpolableValue.get(), environment);
}
开发者ID:mirror,项目名称:chromium,代码行数:59,代码来源:InvalidatableInterpolation.cpp


示例6: composite

void SVGPointListInterpolationType::composite(
    UnderlyingValueOwner& underlyingValueOwner,
    double underlyingFraction,
    const InterpolationValue& value,
    double interpolationFraction) const {
  size_t startLength =
      toInterpolableList(*underlyingValueOwner.value().interpolableValue)
          .length();
  size_t endLength = toInterpolableList(*value.interpolableValue).length();
  if (startLength == endLength)
    InterpolationType::composite(underlyingValueOwner, underlyingFraction,
                                 value, interpolationFraction);
  else
    underlyingValueOwner.set(*this, value);
}
开发者ID:mirror,项目名称:chromium,代码行数:15,代码来源:SVGPointListInterpolationType.cpp


示例7: composite

void SVGTransformListInterpolationType::composite(
    UnderlyingValueOwner& underlyingValueOwner,
    double underlyingFraction,
    const InterpolationValue& value,
    double interpolationFraction) const {
  underlyingValueOwner.set(*this, value);
}
开发者ID:mirror,项目名称:chromium,代码行数:7,代码来源:SVGTransformListInterpolationType.cpp


示例8: isCacheValid

bool InvalidatableInterpolation::isCacheValid(
    const InterpolationEnvironment& environment,
    const UnderlyingValueOwner& underlyingValueOwner) const {
  if (!m_isCached)
    return false;
  if (isNeutralKeyframeActive()) {
    if (m_cachedPairConversion && m_cachedPairConversion->isFlip())
      return false;
    // Pairwise interpolation can never happen between different
    // InterpolationTypes, neutral values always represent the underlying value.
    if (!underlyingValueOwner || !m_cachedValue ||
        m_cachedValue->type() != underlyingValueOwner.type())
      return false;
  }
  for (const auto& checker : m_conversionCheckers) {
    if (!checker->isValid(environment, underlyingValueOwner.value()))
      return false;
  }
  return true;
}
开发者ID:mirror,项目名称:chromium,代码行数:20,代码来源:InvalidatableInterpolation.cpp


示例9: composite

void CSSBorderImageLengthBoxInterpolationType::composite(
    UnderlyingValueOwner& underlyingValueOwner,
    double underlyingFraction,
    const InterpolationValue& value,
    double interpolationFraction) const {
  const SideNumbers& underlyingSideNumbers =
      toCSSBorderImageLengthBoxNonInterpolableValue(
          *underlyingValueOwner.value().nonInterpolableValue)
          .sideNumbers();
  const auto& nonInterpolableValue =
      toCSSBorderImageLengthBoxNonInterpolableValue(
          *value.nonInterpolableValue);
  const SideNumbers& sideNumbers = nonInterpolableValue.sideNumbers();

  if (underlyingSideNumbers != sideNumbers) {
    underlyingValueOwner.set(*this, value);
    return;
  }

  InterpolationValue& underlyingValue = underlyingValueOwner.mutableValue();
  InterpolableList& underlyingList =
      toInterpolableList(*underlyingValue.interpolableValue);
  Vector<RefPtr<NonInterpolableValue>>& underlyingSideNonInterpolableValues =
      toCSSBorderImageLengthBoxNonInterpolableValue(
          *underlyingValue.nonInterpolableValue)
          .sideNonInterpolableValues();
  const InterpolableList& list = toInterpolableList(*value.interpolableValue);
  const Vector<RefPtr<NonInterpolableValue>>& sideNonInterpolableValues =
      nonInterpolableValue.sideNonInterpolableValues();

  for (size_t i = 0; i < SideIndexCount; i++) {
    if (sideNumbers.isNumber[i])
      underlyingList.getMutable(i)->scaleAndAdd(underlyingFraction,
                                                *list.get(i));
    else
      LengthInterpolationFunctions::composite(
          underlyingList.getMutable(i), underlyingSideNonInterpolableValues[i],
          underlyingFraction, *list.get(i), sideNonInterpolableValues[i].get());
  }
}
开发者ID:mirror,项目名称:chromium,代码行数:40,代码来源:CSSBorderImageLengthBoxInterpolationType.cpp


示例10: create

std::unique_ptr<PairwisePrimitiveInterpolation>
InvalidatableInterpolation::maybeConvertPairwise(
    const InterpolationEnvironment& environment,
    const UnderlyingValueOwner& underlyingValueOwner) const {
  DCHECK(m_currentFraction != 0 && m_currentFraction != 1);
  for (const auto& interpolationType : m_interpolationTypes) {
    if ((m_startKeyframe->isNeutral() || m_endKeyframe->isNeutral()) &&
        (!underlyingValueOwner ||
         underlyingValueOwner.type() != *interpolationType))
      continue;
    ConversionCheckers conversionCheckers;
    PairwiseInterpolationValue result = interpolationType->maybeConvertPairwise(
        *m_startKeyframe, *m_endKeyframe, environment,
        underlyingValueOwner.value(), conversionCheckers);
    addConversionCheckers(*interpolationType, conversionCheckers);
    if (result) {
      return PairwisePrimitiveInterpolation::create(
          *interpolationType, std::move(result.startInterpolableValue),
          std::move(result.endInterpolableValue),
          result.nonInterpolableValue.release());
    }
  }
  return nullptr;
}
开发者ID:mirror,项目名称:chromium,代码行数:24,代码来源:InvalidatableInterpolation.cpp


示例11: composite

void CSSScaleInterpolationType::composite(
    UnderlyingValueOwner& underlyingValueOwner,
    double underlyingFraction,
    const InterpolationValue& value,
    double interpolationFraction) const {
  const CSSScaleNonInterpolableValue& metadata =
      toCSSScaleNonInterpolableValue(*value.nonInterpolableValue);
  DCHECK(metadata.isStartAdditive() || metadata.isEndAdditive());

  InterpolableList& underlyingList = toInterpolableList(
      *underlyingValueOwner.mutableValue().interpolableValue);
  for (size_t i = 0; i < 3; i++) {
    InterpolableNumber& underlying =
        toInterpolableNumber(*underlyingList.getMutable(i));
    double start = metadata.start().array[i] *
                   (metadata.isStartAdditive() ? underlying.value() : 1);
    double end = metadata.end().array[i] *
                 (metadata.isEndAdditive() ? underlying.value() : 1);
    underlying.set(blend(start, end, interpolationFraction));
  }
}
开发者ID:ollie314,项目名称:chromium,代码行数:21,代码来源:CSSScaleInterpolationType.cpp


示例12: composite

void ListInterpolationFunctions::composite(UnderlyingValueOwner& underlyingValueOwner, double underlyingFraction, const InterpolationType& type, const InterpolationValue& value, NonInterpolableValuesAreCompatibleCallback nonInterpolableValuesAreCompatible, CompositeItemCallback compositeItem)
{
    size_t underlyingLength = toInterpolableList(*underlyingValueOwner.value().interpolableValue).length();
    if (underlyingLength == 0) {
        ASSERT(!underlyingValueOwner.value().nonInterpolableValue);
        underlyingValueOwner.set(type, value);
        return;
    }

    const InterpolableList& interpolableList = toInterpolableList(*value.interpolableValue);
    size_t valueLength = interpolableList.length();
    if (valueLength == 0) {
        ASSERT(!value.nonInterpolableValue);
        underlyingValueOwner.mutableValue().interpolableValue->scale(underlyingFraction);
        return;
    }

    const NonInterpolableList& nonInterpolableList = toNonInterpolableList(*value.nonInterpolableValue);
    size_t newLength = lowestCommonMultiple(underlyingLength, valueLength);
    if (!nonInterpolableListsAreCompatible(toNonInterpolableList(*underlyingValueOwner.value().nonInterpolableValue), nonInterpolableList, newLength, nonInterpolableValuesAreCompatible)) {
        underlyingValueOwner.set(type, value);
        return;
    }

    InterpolationValue& underlyingValue = underlyingValueOwner.mutableValue();
    if (underlyingLength < newLength)
        repeatToLength(underlyingValue, newLength);

    InterpolableList& underlyingInterpolableList = toInterpolableList(*underlyingValue.interpolableValue);
    NonInterpolableList& underlyingNonInterpolableList = toNonInterpolableList(*underlyingValue.nonInterpolableValue);
    for (size_t i = 0; i < newLength; i++) {
        compositeItem(
            underlyingInterpolableList.getMutable(i),
            underlyingNonInterpolableList.getMutable(i),
            underlyingFraction,
            *interpolableList.get(i % valueLength),
            nonInterpolableList.get(i % valueLength));
    }
}
开发者ID:astojilj,项目名称:chromium-crosswalk,代码行数:39,代码来源:ListInterpolationFunctions.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ UndirectedGraph类代码示例发布时间:2022-05-31
下一篇:
C++ UndercarriageCtrlGeom类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap