skia2/include/private/GrInstancedPipelineInfo.h
Brian Salomon 63e7973d1f Remove GrSurfaceProxy::desc()
Adds a numStencilSamples() getter.

Bug: skia:
Change-Id: I1e57f19b3cb490a6214ea436622ed8128a5a9303
Reviewed-on: https://skia-review.googlesource.com/16994
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-05-17 13:27:12 +00:00

31 lines
922 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(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