Skip to content

Commit

Permalink
Deterministic lite rtti
Browse files Browse the repository at this point in the history
Made lite rtti now use compile time hashes that use the name of the class with rtti enabled as the hash string.

Every use of rtti now needs to be a macro. but other then that, usage of lite rtti is unchanged.

Diffs=
2be44a0f45 Deterministic lite rtti (#8349)

Co-authored-by: Jonathon Copeland <[email protected]>
  • Loading branch information
blakdragan7 and blakdragan7 committed Oct 18, 2024
1 parent 4430d6f commit c1d1241
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
054e3c5b7370c78d59fa4c74d6bf7ff4f25f8f7b
2be44a0f45faddf21ebf71bf0bc521d5276fb811
10 changes: 5 additions & 5 deletions rive-rs/src/ffi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ extern "C"
float);
} RendererEntries;

class RustBuffer : public lite_rtti_override<RenderBuffer, RustBuffer>
class RustBuffer : public LITE_RTTI_OVERRIDE(RenderBuffer, RustBuffer)
{
private:
const RawRustBuffer* m_buffer;
Expand All @@ -157,7 +157,7 @@ extern "C"
void onUnmap() override { m_entries->buffer_unmap(m_buffer); }
};

class RustShader : public lite_rtti_override<RenderShader, RustShader>
class RustShader : public LITE_RTTI_OVERRIDE(RenderShader, RustShader)
{
private:
const RawRustGradient* m_gradient;
Expand All @@ -173,7 +173,7 @@ extern "C"
const RawRustGradient* gradient() const { return m_gradient; }
};

class RustImage : public lite_rtti_override<RenderImage, RustImage>
class RustImage : public LITE_RTTI_OVERRIDE(RenderImage, RustImage)
{
private:
const RawRustImage* m_image;
Expand All @@ -188,7 +188,7 @@ extern "C"
const RawRustImage* image() const { return m_image; }
};

class RustPath : public lite_rtti_override<RenderPath, RustPath>
class RustPath : public LITE_RTTI_OVERRIDE(RenderPath, RustPath)
{
private:
const RawRustPath* m_path;
Expand Down Expand Up @@ -230,7 +230,7 @@ extern "C"
virtual void close() override { m_entries->path_close(m_path); }
};

class RustPaint : public lite_rtti_override<RenderPaint, RustPaint>
class RustPaint : public LITE_RTTI_OVERRIDE(RenderPaint, RustPaint)
{
private:
const RawRustPaint* m_paint;
Expand Down
2 changes: 1 addition & 1 deletion submodules/rive-cpp

0 comments on commit c1d1241

Please sign in to comment.