mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 22:53:43 +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
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user