Rename "preferredInternalSampleCount" to "internalMultisampleCount"
Bug: skia: Change-Id: If6e0287b3d631f4f3856875d94c84d1ddea44f22 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223279 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
parent
511dcfc339
commit
a1638a527e
@ -198,8 +198,10 @@ struct SK_API GrContextOptions {
|
||||
/**
|
||||
* Specifies the number of samples Ganesh should use when performing internal draws with MSAA or
|
||||
* mixed samples (hardware capabilities permitting).
|
||||
*
|
||||
* If 0, Ganesh will disable internal code paths that use multisampling.
|
||||
*/
|
||||
int fPreferredInternalSampleCount = 4;
|
||||
int fInternalMultisampleCount = 4;
|
||||
|
||||
#if GR_TEST_UTILS
|
||||
/**
|
||||
|
@ -57,7 +57,7 @@ GrCaps::GrCaps(const GrContextOptions& options) {
|
||||
fMaxPreferredRenderTargetSize = 1;
|
||||
fMaxTextureSize = 1;
|
||||
fMaxWindowRectangles = 0;
|
||||
fPreferredInternalSampleCount = 0;
|
||||
fInternalMultisampleCount = 0;
|
||||
|
||||
fSuppressPrints = options.fSuppressPrints;
|
||||
#if GR_TEST_UTILS
|
||||
@ -118,7 +118,7 @@ void GrCaps::applyOptionsOverrides(const GrContextOptions& options) {
|
||||
fMaxWindowRectangles = GrWindowRectangles::kMaxWindows;
|
||||
}
|
||||
|
||||
fPreferredInternalSampleCount = options.fPreferredInternalSampleCount;
|
||||
fInternalMultisampleCount = options.fInternalMultisampleCount;
|
||||
|
||||
fAvoidStencilBuffers = options.fAvoidStencilBuffers;
|
||||
|
||||
@ -241,7 +241,7 @@ void GrCaps::dumpJSON(SkJSONWriter* writer) const {
|
||||
writer->appendS32("Max Preferred Render Target Size", fMaxPreferredRenderTargetSize);
|
||||
writer->appendS32("Max Window Rectangles", fMaxWindowRectangles);
|
||||
writer->appendS32("Preferred Sample Count for Internal MSAA and Mixed Samples",
|
||||
fPreferredInternalSampleCount);
|
||||
fInternalMultisampleCount);
|
||||
|
||||
static const char* kBlendEquationSupportNames[] = {
|
||||
"Basic",
|
||||
|
@ -170,9 +170,9 @@ public:
|
||||
virtual int maxRenderTargetSampleCount(GrPixelConfig) const = 0;
|
||||
|
||||
// Returns the number of samples to use when performing internal draws to the given config with
|
||||
// MSAA or mixed samples. See maxRenderTargetSampleCount() for meanings of 0 or 1 return values.
|
||||
int preferredInternalSampleCount(GrPixelConfig config) const {
|
||||
return SkTMin(fPreferredInternalSampleCount, this->maxRenderTargetSampleCount(config));
|
||||
// MSAA or mixed samples. If 0, Ganesh should not attempt to use internal multisampling.
|
||||
int internalMultisampleCount(GrPixelConfig config) const {
|
||||
return SkTMin(fInternalMultisampleCount, this->maxRenderTargetSampleCount(config));
|
||||
}
|
||||
|
||||
bool isConfigRenderable(GrPixelConfig config) const {
|
||||
@ -455,7 +455,7 @@ protected:
|
||||
int fMaxTextureSize;
|
||||
int fMaxTileSize;
|
||||
int fMaxWindowRectangles;
|
||||
int fPreferredInternalSampleCount;
|
||||
int fInternalMultisampleCount;
|
||||
|
||||
GrDriverBugWorkarounds fDriverBugWorkarounds;
|
||||
|
||||
|
@ -298,7 +298,7 @@ Viewer::Viewer(int argc, char** argv, void* platformData)
|
||||
displayParams.fGrContextOptions.fDisallowGLSLBinaryCaching = true;
|
||||
displayParams.fGrContextOptions.fShaderErrorHandler = &gShaderErrorHandler;
|
||||
displayParams.fGrContextOptions.fSuppressPrints = true;
|
||||
displayParams.fGrContextOptions.fPreferredInternalSampleCount = FLAGS_internalSamples;
|
||||
displayParams.fGrContextOptions.fInternalMultisampleCount = FLAGS_internalSamples;
|
||||
fWindow->setRequestedDisplayParams(displayParams);
|
||||
|
||||
// Configure timers
|
||||
|
Loading…
Reference in New Issue
Block a user