-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename to remove unneeded pls in variable names
Diffs= 57a94aff0 Rename to remove unneeded pls in variable names (#7992) Co-authored-by: rivessamr <suki@rive.app>
- Loading branch information
Showing
30 changed files
with
237 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
cc903ee0236a43b850488e029f270e5da23625b7 | ||
57a94aff03ab42d68b04c32ecbaeb4fadb752fec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright 2023 Rive | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "rive/renderer/texture.hpp" | ||
|
||
namespace rive | ||
{ | ||
class RiveRenderImage : public lite_rtti_override<RenderImage, RiveRenderImage> | ||
{ | ||
public: | ||
RiveRenderImage(rcp<gpu::Texture> texture) : | ||
RiveRenderImage(texture->width(), texture->height()) | ||
{ | ||
resetTexture(std::move(texture)); | ||
} | ||
|
||
rcp<gpu::Texture> refTexture() const { return m_texture; } | ||
const gpu::Texture* getTexture() const { return m_texture.get(); } | ||
|
||
protected: | ||
RiveRenderImage(int width, int height) | ||
{ | ||
m_Width = width; | ||
m_Height = height; | ||
} | ||
|
||
void resetTexture(rcp<gpu::Texture> texture = nullptr) | ||
{ | ||
assert(texture == nullptr || texture->width() == m_Width); | ||
assert(texture == nullptr || texture->height() == m_Height); | ||
m_texture = std::move(texture); | ||
} | ||
|
||
// Used by the android runtime to send m_texture off to the worker thread to be deleted. | ||
gpu::Texture* releaseTexture() { return m_texture.release(); } | ||
|
||
private: | ||
rcp<gpu::Texture> m_texture; | ||
}; | ||
} // namespace rive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.