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


C++ GrCaps::usesMixedSamples方法代码示例

本文整理汇总了C++中GrCaps::usesMixedSamples方法的典型用法代码示例。如果您正苦于以下问题:C++ GrCaps::usesMixedSamples方法的具体用法?C++ GrCaps::usesMixedSamples怎么用?C++ GrCaps::usesMixedSamples使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GrCaps的用法示例。


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

示例1: SrcOverWillNeedDstTexture

bool GrPorterDuffXPFactory::SrcOverWillNeedDstTexture(const GrCaps& caps,
                                                     const GrPipelineOptimizations& optimizations) {
    if (caps.shaderCaps()->dstReadInShaderSupport() ||
        caps.shaderCaps()->dualSourceBlendingSupport()) {
        return false;
    }

    // When we have four channel coverage we always need to read the dst in order to correctly
    // blend. The one exception is when we are using srcover mode and we know the input color
    // into the XP.
    if (optimizations.fCoveragePOI.isFourChannelOutput()) {
        if (kRGBA_GrColorComponentFlags == optimizations.fColorPOI.validFlags() &&
            !caps.shaderCaps()->dstReadInShaderSupport()) {
            return false;
        }
        return get_lcd_blend_formula(optimizations.fCoveragePOI,
                                     SkBlendMode::kSrcOver).hasSecondaryOutput();
    }

    // We fallback on the shader XP when the blend formula would use dual source blending but we
    // don't have support for it.
    static const bool kHasMixedSamples = false;
    SkASSERT(!caps.usesMixedSamples()); // We never use mixed samples without dual source blending.
    return get_blend_formula(optimizations.fColorPOI, optimizations.fCoveragePOI,
                             kHasMixedSamples, SkBlendMode::kSrcOver).hasSecondaryOutput();
}
开发者ID:aseprite,项目名称:skia,代码行数:26,代码来源:GrPorterDuffXferProcessor.cpp

示例2: INHERITED

// Deferred version
// TODO: we can probably munge the 'desc' in both the wrapped and deferred
// cases to make the sampleConfig/numSamples stuff more rational.
GrRenderTargetProxy::GrRenderTargetProxy(const GrCaps& caps, const GrSurfaceDesc& desc,
                                         SkBackingFit fit, SkBudgeted budgeted, uint32_t flags)
    : INHERITED(desc, fit, budgeted, flags)
    , fRenderTargetFlags(GrRenderTarget::Flags::kNone) {
    // Since we know the newly created render target will be internal, we are able to precompute
    // what the flags will ultimately end up being.
    if (caps.usesMixedSamples() && fDesc.fSampleCnt > 0) {
        fRenderTargetFlags |= GrRenderTarget::Flags::kMixedSampled;
    }
    if (caps.maxWindowRectangles() > 0) {
        fRenderTargetFlags |= GrRenderTarget::Flags::kWindowRectsSupport;
    }
}
开发者ID:Wafflespeanut,项目名称:gecko-dev,代码行数:16,代码来源:GrRenderTargetProxy.cpp

示例3: ComputeSampleConfig

GrRenderTarget::SampleConfig GrRenderTarget::ComputeSampleConfig(const GrCaps& caps,
                                                                 int sampleCnt) {
    return (caps.usesMixedSamples() && sampleCnt > 0)
                        ? GrRenderTarget::kStencil_SampleConfig
                        : GrRenderTarget::kUnified_SampleConfig;
}
开发者ID:03050903,项目名称:skia,代码行数:6,代码来源:GrRenderTarget.cpp


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