summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorStenzek <stenzek@users.noreply.github.com>2018-10-24 14:51:21 +1100
committerGitHub <noreply@github.com>2018-10-24 14:51:21 +1100
commitc4d1e4adffcd380cc87b841069ce2fe8b62d7b60 (patch)
treec61a0a07c14ccc3c1f7247bdcc82927a82c145bb /Source/Core/VideoCommon
parent9c9d598ec006527bc47aea306e5171d03c12c5f5 (diff)
parent2c6d96433c322b50470705d43005fd6308506d49 (diff)
Merge pull request #7450 from stenzek/glcontext
GLInterface refactoring/cleanup and runtime platform selection
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/DriverDetails.cpp2
-rw-r--r--Source/Core/VideoCommon/DriverDetails.h1
-rw-r--r--Source/Core/VideoCommon/RenderBase.cpp7
-rw-r--r--Source/Core/VideoCommon/RenderBase.h8
-rw-r--r--Source/Core/VideoCommon/VideoBackendBase.h3
5 files changed, 7 insertions, 14 deletions
diff --git a/Source/Core/VideoCommon/DriverDetails.cpp b/Source/Core/VideoCommon/DriverDetails.cpp
index 301c73d89f..fd52d3dd6b 100644
--- a/Source/Core/VideoCommon/DriverDetails.cpp
+++ b/Source/Core/VideoCommon/DriverDetails.cpp
@@ -35,8 +35,6 @@ const u32 m_os = OS_ALL | OS_LINUX;
const u32 m_os = OS_ALL | OS_FREEBSD;
#elif __OpenBSD__
const u32 m_os = OS_ALL | OS_OPENBSD;
-#elif __HAIKU__
-const u32 m_os = OS_ALL | OS_HAIKU;
#endif
static API m_api = API_OPENGL;
diff --git a/Source/Core/VideoCommon/DriverDetails.h b/Source/Core/VideoCommon/DriverDetails.h
index 9ace5f83b4..7d60b0e168 100644
--- a/Source/Core/VideoCommon/DriverDetails.h
+++ b/Source/Core/VideoCommon/DriverDetails.h
@@ -27,7 +27,6 @@ enum OS
OS_ANDROID = (1 << 4),
OS_FREEBSD = (1 << 5),
OS_OPENBSD = (1 << 6),
- OS_HAIKU = (1 << 7),
};
// Enum of known vendors
// Tegra and Nvidia are separated out due to such substantial differences
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp
index 317f876aa7..5aa6989615 100644
--- a/Source/Core/VideoCommon/RenderBase.cpp
+++ b/Source/Core/VideoCommon/RenderBase.cpp
@@ -86,7 +86,6 @@ Renderer::Renderer(int backbuffer_width, int backbuffer_height)
if (SConfig::GetInstance().bWii)
m_aspect_wide = Config::Get(Config::SYSCONF_WIDESCREEN);
- m_surface_handle = Host_GetRenderHandle();
m_last_host_config_bits = ShaderHostConfig::GetCurrent().bits;
m_last_efb_multisamples = g_ActiveConfig.iMultisamples;
}
@@ -408,7 +407,7 @@ float Renderer::CalculateDrawAspectRatio() const
bool Renderer::IsHeadless() const
{
- return !m_surface_handle;
+ return true;
}
void Renderer::ChangeSurface(void* new_surface_handle)
@@ -418,11 +417,9 @@ void Renderer::ChangeSurface(void* new_surface_handle)
m_surface_changed.Set();
}
-void Renderer::ResizeSurface(int new_width, int new_height)
+void Renderer::ResizeSurface()
{
std::lock_guard<std::mutex> lock(m_swap_mutex);
- m_new_backbuffer_width = new_width;
- m_new_backbuffer_height = new_height;
m_surface_resized.Set();
}
diff --git a/Source/Core/VideoCommon/RenderBase.h b/Source/Core/VideoCommon/RenderBase.h
index e5861d00c9..d5dd761c40 100644
--- a/Source/Core/VideoCommon/RenderBase.h
+++ b/Source/Core/VideoCommon/RenderBase.h
@@ -77,6 +77,8 @@ public:
using ClearColor = std::array<float, 4>;
+ virtual bool IsHeadless() const = 0;
+
virtual void SetPipeline(const AbstractPipeline* pipeline) {}
virtual void SetScissorRect(const MathUtil::Rectangle<int>& rc) {}
virtual void SetTexture(u32 index, const AbstractTexture* texture) {}
@@ -134,7 +136,6 @@ public:
const TargetRectangle& GetTargetRectangle() const { return m_target_rectangle; }
float CalculateDrawAspectRatio() const;
- bool IsHeadless() const;
std::tuple<float, float> ScaleToDisplayAspectRatio(int width, int height) const;
void UpdateDrawRectangle();
@@ -182,7 +183,7 @@ public:
// Final surface changing
// This is called when the surface is resized (WX) or the window changes (Android).
void ChangeSurface(void* new_surface_handle);
- void ResizeSurface(int new_width, int new_height);
+ void ResizeSurface();
bool UseVertexDepthRange() const;
virtual std::unique_ptr<VideoCommon::AsyncShaderCompiler> CreateAsyncShaderCompiler();
@@ -228,15 +229,12 @@ protected:
// Backbuffer (window) size and render area
int m_backbuffer_width = 0;
int m_backbuffer_height = 0;
- int m_new_backbuffer_width = 0;
- int m_new_backbuffer_height = 0;
TargetRectangle m_target_rectangle = {};
FPSCounter m_fps_counter;
std::unique_ptr<PostProcessingShaderImplementation> m_post_processor;
- void* m_surface_handle = nullptr;
void* m_new_surface_handle = nullptr;
Common::Flag m_surface_changed;
Common::Flag m_surface_resized;
diff --git a/Source/Core/VideoCommon/VideoBackendBase.h b/Source/Core/VideoCommon/VideoBackendBase.h
index 5f43b904d4..83a74b0608 100644
--- a/Source/Core/VideoCommon/VideoBackendBase.h
+++ b/Source/Core/VideoCommon/VideoBackendBase.h
@@ -9,6 +9,7 @@
#include <vector>
#include "Common/CommonTypes.h"
+#include "Common/WindowSystemInfo.h"
#include "VideoCommon/PerfQueryBase.h"
namespace MMIO
@@ -35,7 +36,7 @@ class VideoBackendBase
{
public:
virtual ~VideoBackendBase() {}
- virtual bool Initialize(void* window_handle) = 0;
+ virtual bool Initialize(const WindowSystemInfo& wsi) = 0;
virtual void Shutdown() = 0;
virtual std::string GetName() const = 0;