[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:
Alexander Borsuk
2025-08-01 13:01:16 +02:00
committed by Konstantin Pastbin
parent 55dc1e17e6
commit a28d5d15ce
11 changed files with 27 additions and 29 deletions

View File

@@ -11,34 +11,34 @@ public:
: dp::metal::MetalBaseContext(metalLayer.device, screenSize, [this]{ return [m_metalLayer nextDrawable]; })
, m_metalLayer(metalLayer)
{}
void Resize(int w, int h) override
void Resize(uint32_t w, uint32_t h) override
{
m_metalLayer.drawableSize = CGSize{static_cast<float>(w), static_cast<float>(h)};
ResetFrameDrawable();
dp::metal::MetalBaseContext::Resize(w, h);
}
private:
CAMetalLayer * m_metalLayer;
};
class UploadMetalContext : public dp::metal::MetalBaseContext
{
public:
explicit UploadMetalContext(id<MTLDevice> device)
: dp::metal::MetalBaseContext(device, {}, nullptr)
{}
void Present() override {}
void MakeCurrent() 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::Metal, ());
}
void SetClearColor(dp::Color const & color) override {}
void Clear(uint32_t clearBits, uint32_t storeBits) override {}
void Flush() override {}