mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-03 19:33:49 +00:00
[drape] Fixed signed/unsigned comparison warning by changing Resize interface to uint32_t
Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
committed by
Konstantin Pastbin
parent
55dc1e17e6
commit
a28d5d15ce
@@ -61,7 +61,7 @@ public:
|
||||
virtual void ForgetFramebuffer(ref_ptr<BaseFramebuffer> framebuffer) = 0;
|
||||
virtual void ApplyFramebuffer(std::string const & framebufferLabel) = 0;
|
||||
// w, h - pixel size of render target (logical size * visual scale).
|
||||
virtual void Resize(int /* w */, int /* h */) {}
|
||||
virtual void Resize(uint32_t /* w */, uint32_t /* h */) {}
|
||||
virtual void SetRenderingEnabled(bool /* enabled */) {}
|
||||
virtual void SetPresentAvailable(bool /* available */) {}
|
||||
virtual bool Validate() { return true; }
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
void MakeCurrent() override {}
|
||||
void DoneCurrent() override {}
|
||||
bool Validate() override { return true; }
|
||||
void Resize(int w, int h) override;
|
||||
void Resize(uint32_t w, uint32_t h) override;
|
||||
void SetFramebuffer(ref_ptr<dp::BaseFramebuffer> framebuffer) override;
|
||||
void ForgetFramebuffer(ref_ptr<dp::BaseFramebuffer> framebuffer) override {}
|
||||
void ApplyFramebuffer(std::string const & framebufferLabel) override;
|
||||
|
||||
@@ -130,12 +130,12 @@ void MetalBaseContext::PopDebugLabel()
|
||||
[m_currentCommandEncoder popDebugGroup];
|
||||
}
|
||||
|
||||
void MetalBaseContext::Resize(int w, int h)
|
||||
void MetalBaseContext::Resize(uint32_t w, uint32_t h)
|
||||
{
|
||||
if (m_depthTexture && m_depthTexture->GetWidth() == w && m_depthTexture->GetHeight() == h)
|
||||
return;
|
||||
|
||||
RecreateDepthTexture(m2::PointU(w, h));
|
||||
RecreateDepthTexture({w, h});
|
||||
}
|
||||
|
||||
void MetalBaseContext::SetFramebuffer(ref_ptr<dp::BaseFramebuffer> framebuffer)
|
||||
|
||||
@@ -142,15 +142,15 @@ void VulkanBaseContext::SetRenderingQueue(VkQueue queue)
|
||||
m_queue = queue;
|
||||
}
|
||||
|
||||
void VulkanBaseContext::Resize(int w, int h)
|
||||
void VulkanBaseContext::Resize(uint32_t w, uint32_t h)
|
||||
{
|
||||
if (m_swapchain != VK_NULL_HANDLE && m_surfaceCapabilities.currentExtent.width == static_cast<uint32_t>(w) &&
|
||||
m_surfaceCapabilities.currentExtent.height == static_cast<uint32_t>(h))
|
||||
if (m_swapchain != VK_NULL_HANDLE && m_surfaceCapabilities.currentExtent.width == w &&
|
||||
m_surfaceCapabilities.currentExtent.height == h)
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_surfaceCapabilities.currentExtent.width = static_cast<uint32_t>(w);
|
||||
m_surfaceCapabilities.currentExtent.height = static_cast<uint32_t>(h);
|
||||
m_surfaceCapabilities.currentExtent.width = w;
|
||||
m_surfaceCapabilities.currentExtent.height = h;
|
||||
RecreateSwapchainAndDependencies();
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
void CollectMemory() override;
|
||||
void DoneCurrent() override {}
|
||||
bool Validate() override { return true; }
|
||||
void Resize(int w, int h) override;
|
||||
void Resize(uint32_t w, uint32_t h) override;
|
||||
void SetFramebuffer(ref_ptr<dp::BaseFramebuffer> framebuffer) override;
|
||||
void ForgetFramebuffer(ref_ptr<dp::BaseFramebuffer> framebuffer) override;
|
||||
void ApplyFramebuffer(std::string const & framebufferLabel) override;
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
|
||||
void Present() override {}
|
||||
|
||||
void Resize(int w, int h) override {}
|
||||
void Resize(uint32_t w, uint32_t h) override {}
|
||||
void SetFramebuffer(ref_ptr<dp::BaseFramebuffer> framebuffer) override {}
|
||||
void Init(dp::ApiVersion apiVersion) override { CHECK_EQUAL(apiVersion, dp::ApiVersion::Vulkan, ()); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user