diff options
author | Brian Salomon <bsalomon@google.com> | 2017-12-07 14:34:36 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-08 13:41:10 +0000 |
commit | f06c3582677270c741a5e4fb366ec8b5d4ec4c21 (patch) | |
tree | be9fb470ef48933fdd5b6deb18ab3a01d373686b /tools/viewer | |
parent | 852ca318a16f9c455d2bed3efb2063dff0e4d068 (diff) |
Remove instanced rendering
Change-Id: I4219b1d23a647b849ee41fe71b53e1c45edfc3f4
Reviewed-on: https://skia-review.googlesource.com/82241
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tools/viewer')
-rw-r--r-- | tools/viewer/Viewer.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp index c2e03b18cd..1cba520695 100644 --- a/tools/viewer/Viewer.cpp +++ b/tools/viewer/Viewer.cpp @@ -166,7 +166,6 @@ static DEFINE_int32(msaa, 0, "Number of subpixel samples. 0 for no HW antialiasi static DEFINE_bool(cachePathMasks, true, "Allows path mask textures to be cached in GPU configs."); DEFINE_pathrenderer_flag; -static DEFINE_bool(instancedRendering, false, "Enable instanced rendering on GPU backends."); DECLARE_int32(threads) const char* kBackendTypeStrings[sk_app::Window::kBackendTypeCount] = { @@ -252,7 +251,6 @@ const char* kSlideStateName = "Slide"; const char* kBackendStateName = "Backend"; const char* kMSAAStateName = "MSAA"; const char* kPathRendererStateName = "Path renderer"; -const char* kInstancedRenderingStateName = "Instanced rendering"; const char* kSoftkeyStateName = "Softkey"; const char* kSoftkeyHint = "Please select a softkey"; const char* kFpsStateName = "FPS"; @@ -320,7 +318,6 @@ Viewer::Viewer(int argc, char** argv, void* platformData) DisplayParams displayParams; displayParams.fMSAASampleCount = FLAGS_msaa; - displayParams.fGrContextOptions.fEnableInstancedRendering = FLAGS_instancedRendering; displayParams.fGrContextOptions.fGpuPathRenderers = CollectGpuPathRenderersFromFlags(); displayParams.fGrContextOptions.fAllowPathMaskCaching = FLAGS_cachePathMasks; displayParams.fGrContextOptions.fExecutor = GpuExecutorForTools(); @@ -1250,10 +1247,6 @@ void Viewer::drawImGui(SkCanvas* canvas) { } const GrContext* ctx = fWindow->getGrContext(); - bool* inst = ¶ms.fGrContextOptions.fEnableInstancedRendering; - if (ctx && ImGui::Checkbox("Instanced Rendering", inst)) { - paramsChanged = true; - } bool* wire = ¶ms.fGrContextOptions.fWireframeMode; if (ctx && ImGui::Checkbox("Wireframe Mode", wire)) { paramsChanged = true; @@ -1603,19 +1596,6 @@ void Viewer::updateUIState() { prState[kOptions].append(gPathRendererNames[GpuPathRenderers::kNone]); } - // Instanced rendering state - Json::Value instState(Json::objectValue); - instState[kName] = kInstancedRenderingStateName; - instState[kValue] = kOFF; - instState[kOptions] = Json::Value(Json::arrayValue); - if (ctx) { - if (fWindow->getRequestedDisplayParams().fGrContextOptions.fEnableInstancedRendering) { - instState[kValue] = kON; - } - instState[kOptions].append(kOFF); - instState[kOptions].append(kON); - } - // Softkey state Json::Value softkeyState(Json::objectValue); softkeyState[kName] = kSoftkeyStateName; @@ -1642,7 +1622,6 @@ void Viewer::updateUIState() { state.append(backendState); state.append(msaaState); state.append(prState); - state.append(instState); state.append(softkeyState); state.append(fpsState); @@ -1703,16 +1682,6 @@ void Viewer::onUIStateChanged(const SkString& stateName, const SkString& stateVa break; } } - } else if (stateName.equals(kInstancedRenderingStateName)) { - DisplayParams params = fWindow->getRequestedDisplayParams(); - bool value = !strcmp(stateValue.c_str(), kON); - if (params.fGrContextOptions.fEnableInstancedRendering != value) { - params.fGrContextOptions.fEnableInstancedRendering = value; - fWindow->setRequestedDisplayParams(params); - fWindow->inval(); - this->updateTitle(); - this->updateUIState(); - } } else if (stateName.equals(kSoftkeyStateName)) { if (!stateValue.equals(kSoftkeyHint)) { fCommands.onSoftkey(stateValue); |