Skip to content

Commit

Permalink
IGL: Remove unused code from earlier screenshot test setup
Browse files Browse the repository at this point in the history
Summary: This diff removes some code that is unused. It was used in the previous screenshot test setup.

Reviewed By: rameshviswanathan

Differential Revision: D62716511

fbshipit-source-id: 2591d6b0dea9be752945064317fb758034cabe6b
  • Loading branch information
Eric Griffith authored and facebook-github-bot committed Sep 16, 2024
1 parent 3f890e5 commit 2b6fd7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 154 deletions.
17 changes: 5 additions & 12 deletions shell/windows/opengl/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <GLFW/glfw3native.h>

#include "AutoContextReleaseDevice.h"
#include "ImageTestApp.h"
#include <igl/Core.h>
#include <igl/IGL.h>
#include <igl/opengl/Device.h>
Expand Down Expand Up @@ -193,10 +192,10 @@ GLFWwindow* initGLWindow(const shell::RenderSessionConfig& config) {
}

// This mode is the normal running mode when running samples as applications.
static void RunApplicationMode(uint32_t majorVersion,
uint32_t minorVersion,
std::unique_ptr<igl::shell::IRenderSessionFactory> factory,
const shell::RenderSessionConfig& config) {
static void run(uint32_t majorVersion,
uint32_t minorVersion,
std::unique_ptr<igl::shell::IRenderSessionFactory> factory,
const shell::RenderSessionConfig& config) {
shellParams_ = initShellParams();
using WindowPtr = std::unique_ptr<GLFWwindow, decltype(&glfwDestroyWindow)>;
WindowPtr glWindow(initGLWindow(config), &glfwDestroyWindow);
Expand Down Expand Up @@ -286,13 +285,7 @@ int main(int argc, char* argv[]) {

IGL_ASSERT(requestedConfigs[0].backendVersion.flavor == BackendFlavor::OpenGL);

const char* screenshotTestsOutPath = std::getenv("SCREENSHOT_TESTS_OUT");

if (screenshotTestsOutPath) {
shell::util::RunScreenshotTestsMode(shellParams_, std::move(factory));
} else {
RunApplicationMode(majorVersion, minorVersion, std::move(factory), requestedConfigs[0]);
}
run(majorVersion, minorVersion, std::move(factory), requestedConfigs[0]);

return 0;
}
142 changes: 0 additions & 142 deletions shell/windows/opengl/ImageTestApp.h

This file was deleted.

0 comments on commit 2b6fd7f

Please sign in to comment.