aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/GrInstancedPipelineInfo.h
blob: b89f8632cf67e9e45e608837dd209eaaa48d9959 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * Copyright 2016 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef GrGrInstancedPipelineInfo_DEFINED
#define GrGrInstancedPipelineInfo_DEFINED

#include "GrRenderTargetProxy.h"

/**
 * Provides info about the pipeline that GrInstancedRendering needs in order to select appropriate
 * drawing algorithms.
 */
struct GrInstancedPipelineInfo {
    GrInstancedPipelineInfo(const GrRenderTargetProxy* rtp)
            : fIsMultisampled(GrFSAAType::kNone != rtp->fsaaType())
            , fIsMixedSampled(GrFSAAType::kMixedSamples == rtp->fsaaType())
            , fIsRenderingToFloat(GrPixelConfigIsFloatingPoint(rtp->config())) {}

    bool canUseCoverageAA() const { return !fIsMultisampled || fIsMixedSampled; }

    bool fIsMultisampled         : 1;
    bool fIsMixedSampled         : 1;
    bool fIsRenderingToFloat     : 1;
};

#endif