Line data Source code
1 : /*
2 : * Copyright 2016 Google Inc.
3 : *
4 : * Use of this source code is governed by a BSD-style license that can be
5 : * found in the LICENSE file.
6 : */
7 :
8 : #ifndef GrGrInstancedPipelineInfo_DEFINED
9 : #define GrGrInstancedPipelineInfo_DEFINED
10 :
11 : #include "GrRenderTargetProxy.h"
12 :
13 : /**
14 : * Provides info about the pipeline that GrInstancedRendering needs in order to select appropriate
15 : * drawing algorithms.
16 : */
17 : struct GrInstancedPipelineInfo {
18 0 : GrInstancedPipelineInfo(const GrRenderTargetProxy* rtp)
19 0 : : fIsMultisampled(rtp->isStencilBufferMultisampled())
20 0 : , fIsMixedSampled(rtp->isMixedSampled())
21 0 : , fIsRenderingToFloat(GrPixelConfigIsFloatingPoint(rtp->desc().fConfig)) {}
22 :
23 0 : bool canUseCoverageAA() const { return !fIsMultisampled || fIsMixedSampled; }
24 :
25 : bool fIsMultisampled : 1;
26 : bool fIsMixedSampled : 1;
27 : bool fIsRenderingToFloat : 1;
28 : };
29 :
30 : #endif
|