blob: 196c35b96f98c4660bc51462cd899022c5bc0cc8 [file] [log] [blame]
/*
* 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(rtp->isStencilBufferMultisampled())
, fIsMixedSampled(rtp->isMixedSampled())
, fIsRenderingToFloat(GrPixelConfigIsFloatingPoint(rtp->desc().fConfig)) {}
bool canUseCoverageAA() const { return !fIsMultisampled || fIsMixedSampled; }
bool fIsMultisampled : 1;
bool fIsMixedSampled : 1;
bool fIsRenderingToFloat : 1;
};
#endif