-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
61 additions
and
72 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
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,44 @@ | ||
/* | ||
* Copyright 2022 Rive | ||
*/ | ||
|
||
#ifndef _RIVE_COUNTER_HPP_ | ||
#define _RIVE_COUNTER_HPP_ | ||
|
||
#include "rive/rive_types.hpp" | ||
|
||
namespace rive | ||
{ | ||
|
||
struct Counter | ||
{ | ||
enum Type | ||
{ | ||
kFile, | ||
kArtboardInstance, | ||
kLinearAnimationInstance, | ||
kStateMachineInstance, | ||
|
||
kBuffer, | ||
kPath, | ||
kPaint, | ||
kShader, | ||
kImage, | ||
|
||
kLastType = kImage, | ||
}; | ||
|
||
static constexpr int kNumTypes = Type::kLastType + 1; | ||
static int counts[kNumTypes]; | ||
|
||
static void update(Type ct, int delta) | ||
{ | ||
assert(delta == 1 || delta == -1); | ||
counts[ct] += delta; | ||
assert(counts[ct] >= 0); | ||
} | ||
}; | ||
|
||
} // namespace rive | ||
|
||
#endif |
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,12 @@ | ||
|
||
#include <rive/refcnt.hpp> | ||
|
||
#include <renderer.h> | ||
|
||
namespace dmRive | ||
{ | ||
rive::rcp<rive::RenderImage> CreateRiveRenderImage(HRenderContext context, void* bytes, uint32_t byte_count) | ||
{ | ||
return nullptr; | ||
} | ||
} |
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