Remove unused API function

* Headless windows are used as immutable in tests so allowing resizing is
  unnecessary complication
This commit is contained in:
baldurk
2025-01-13 11:09:10 +00:00
parent f3f0617b37
commit 3c5ce8a84a
15 changed files with 5 additions and 141 deletions
-4
View File
@@ -423,10 +423,6 @@ bool DummyDriver::CheckResizeOutputWindow(uint64_t id)
return false;
}
void DummyDriver::SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h)
{
}
void DummyDriver::GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h)
{
}
-1
View File
@@ -145,7 +145,6 @@ public:
uint64_t MakeOutputWindow(WindowingData window, bool depth);
void DestroyOutputWindow(uint64_t id);
bool CheckResizeOutputWindow(uint64_t id);
void SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h);
void GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h);
void GetOutputWindowData(uint64_t id, bytebuf &retData);
void ClearOutputWindowColor(uint64_t id, FloatVector col);
-1
View File
@@ -266,7 +266,6 @@ public:
virtual uint64_t MakeOutputWindow(WindowingData window, bool depth) = 0;
virtual void DestroyOutputWindow(uint64_t id) = 0;
virtual bool CheckResizeOutputWindow(uint64_t id) = 0;
virtual void SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h) = 0;
virtual void GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h) = 0;
virtual void GetOutputWindowData(uint64_t id, bytebuf &retData) = 0;
virtual void ClearOutputWindowColor(uint64_t id, FloatVector col) = 0;
+5 -18
View File
@@ -149,16 +149,6 @@ void ReplayOutput::Shutdown()
m_pController->ShutdownOutput(this);
}
void ReplayOutput::SetDimensions(int32_t width, int32_t height)
{
CHECK_REPLAY_THREAD();
m_pDevice->SetOutputWindowDimensions(m_MainOutput.outputID, width > 0 ? width : 1,
height > 0 ? height : 1);
m_pDevice->GetOutputWindowDimensions(m_MainOutput.outputID, m_Width, m_Height);
m_pController->FatalErrorCheck();
}
bytebuf ReplayOutput::ReadbackOutputTexture()
{
CHECK_REPLAY_THREAD();
@@ -397,24 +387,21 @@ bytebuf ReplayOutput::DrawThumbnail(int32_t width, int32_t height, ResourceId te
if(idx < 0)
{
// resize oldest generator if we have hit the max
// release oldest generator if we have hit the max
if(m_ThumbnailGenerators.size() == MaxThumbnailGenerators)
{
outputID = m_ThumbnailGenerators.back().second;
m_pDevice->SetOutputWindowDimensions(outputID, width, height);
m_pDevice->DestroyOutputWindow(m_ThumbnailGenerators.back().second);
m_ThumbnailGenerators.pop_back();
}
else
{
outputID = m_pDevice->MakeOutputWindow(CreateHeadlessWindowingData(width, height), false);
}
outputID = m_pDevice->MakeOutputWindow(CreateHeadlessWindowingData(width, height), false);
}
else
{
// remove the found one, so it can get inserted into the front
m_ThumbnailGenerators.erase(idx);
}
// make this the most recent generator, so the oldest one will be kicked out
// make this the most recent generator, so the oldest one will be kicked out if we have too many
m_ThumbnailGenerators.insert(0, {key, outputID});
bool depthMode = false;