From f06c3582677270c741a5e4fb366ec8b5d4ec4c21 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Thu, 7 Dec 2017 14:34:36 -0500 Subject: Remove instanced rendering Change-Id: I4219b1d23a647b849ee41fe71b53e1c45edfc3f4 Reviewed-on: https://skia-review.googlesource.com/82241 Reviewed-by: Chris Dalton Commit-Queue: Brian Salomon --- tools/flags/SkCommonFlagsConfig.cpp | 14 +++----------- tools/flags/SkCommonFlagsConfig.h | 3 +-- 2 files changed, 4 insertions(+), 13 deletions(-) (limited to 'tools/flags') diff --git a/tools/flags/SkCommonFlagsConfig.cpp b/tools/flags/SkCommonFlagsConfig.cpp index fe9faaef1d..00db61a240 100644 --- a/tools/flags/SkCommonFlagsConfig.cpp +++ b/tools/flags/SkCommonFlagsConfig.cpp @@ -196,7 +196,7 @@ SkCommandLineConfig::~SkCommandLineConfig() { #if SK_SUPPORT_GPU SkCommandLineConfigGpu::SkCommandLineConfigGpu( const SkString& tag, const SkTArray& viaParts, ContextType contextType, bool useNVPR, - bool useInstanced, bool useDIText, int samples, SkColorType colorType, SkAlphaType alphaType, + bool useDIText, int samples, SkColorType colorType, SkAlphaType alphaType, sk_sp colorSpace, bool useStencilBuffers, bool testThreading) : SkCommandLineConfig(tag, SkString("gpu"), viaParts) , fContextType(contextType) @@ -209,14 +209,11 @@ SkCommandLineConfigGpu::SkCommandLineConfigGpu( , fTestThreading(testThreading) { if (useNVPR) { fContextOverrides |= ContextOverrides::kRequireNVPRSupport; - } else if (!useInstanced) { + } else { // We don't disable NVPR for instanced configs. Otherwise the caps wouldn't use mixed // samples and we couldn't test the mixed samples backend for simple shapes. fContextOverrides |= ContextOverrides::kDisableNVPR; } - if (useInstanced) { - fContextOverrides |= ContextOverrides::kUseInstanced; - } // Subtle logic: If the config has a color space attached, we're going to be rendering to sRGB, // so we need that capability. In addition, to get the widest test coverage, we DO NOT require // that we can disable sRGB decode. (That's for rendering sRGB sources to legacy surfaces). @@ -399,8 +396,6 @@ SkCommandLineConfigGpu* parse_command_line_config_gpu(const SkString& tag, SkCommandLineConfigGpu::ContextType contextType = GrContextFactory::kGL_ContextType; bool seenUseNVPR = false; bool useNVPR = false; - bool seenUseInstanced = false; - bool useInstanced = false; bool seenUseDIText =false; bool useDIText = false; bool seenSamples = false; @@ -431,9 +426,6 @@ SkCommandLineConfigGpu* parse_command_line_config_gpu(const SkString& tag, } else if (key.equals("nvpr") && !seenUseNVPR) { valueOk = parse_option_bool(value, &useNVPR); seenUseNVPR = true; - } else if (key.equals("inst") && !seenUseInstanced) { - valueOk = parse_option_bool(value, &useInstanced); - seenUseInstanced = true; } else if (key.equals("dit") && !seenUseDIText) { valueOk = parse_option_bool(value, &useDIText); seenUseDIText = true; @@ -457,7 +449,7 @@ SkCommandLineConfigGpu* parse_command_line_config_gpu(const SkString& tag, if (!seenAPI) { return nullptr; } - return new SkCommandLineConfigGpu(tag, vias, contextType, useNVPR, useInstanced, useDIText, + return new SkCommandLineConfigGpu(tag, vias, contextType, useNVPR, useDIText, samples, colorType, alphaType, colorSpace, useStencils, testThreading); } diff --git a/tools/flags/SkCommonFlagsConfig.h b/tools/flags/SkCommonFlagsConfig.h index 18b138c468..49d536c0cd 100644 --- a/tools/flags/SkCommonFlagsConfig.h +++ b/tools/flags/SkCommonFlagsConfig.h @@ -54,7 +54,7 @@ class SkCommandLineConfigGpu : public SkCommandLineConfig { typedef sk_gpu_test::GrContextFactory::ContextType ContextType; typedef sk_gpu_test::GrContextFactory::ContextOverrides ContextOverrides; SkCommandLineConfigGpu(const SkString& tag, const SkTArray& viaParts, - ContextType contextType, bool useNVPR, bool useInstanced, bool useDIText, + ContextType contextType, bool useNVPR, bool useDIText, int samples, SkColorType colorType, SkAlphaType alphaType, sk_sp colorSpace, bool useStencilBuffers, bool testThreading); @@ -66,7 +66,6 @@ class SkCommandLineConfigGpu : public SkCommandLineConfig { !(fContextOverrides & ContextOverrides::kDisableNVPR)); return fContextOverrides & ContextOverrides::kRequireNVPRSupport; } - bool getUseInstanced() const { return fContextOverrides & ContextOverrides::kUseInstanced; } bool getUseDIText() const { return fUseDIText; } int getSamples() const { return fSamples; } SkColorType getColorType() const { return fColorType; } -- cgit v1.2.3