5ff3a5c13e
Change-Id: Ieeb8ada92b5196473d5cea77350fd994bfff8916 Reviewed-on: https://skia-review.googlesource.com/9086 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
31 lines
891 B
C
31 lines
891 B
C
/*
|
|
* 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
|