-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1014 from openkraken/fix/ui_command_buffer_instan…
…ce_leak fix: fix ui command buffer instance leak.
- Loading branch information
Showing
15 changed files
with
76 additions
and
63 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
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
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,33 @@ | ||
/* | ||
* Copyright (C) 2020 Alibaba Inc. All rights reserved. | ||
* Author: Kraken Team. | ||
*/ | ||
|
||
#ifndef KRAKENBRIDGE_FOUNDATION_UI_COMMAND_BUFFER_H_ | ||
#define KRAKENBRIDGE_FOUNDATION_UI_COMMAND_BUFFER_H_ | ||
|
||
#include "include/kraken_bridge.h" | ||
|
||
namespace foundation { | ||
|
||
class UICommandBuffer { | ||
public: | ||
UICommandBuffer() = delete; | ||
explicit UICommandBuffer(int32_t contextId); | ||
void addCommand(int32_t id, int32_t type, void* nativePtr, bool batchedUpdate); | ||
void addCommand(int32_t id, int32_t type, void* nativePtr); | ||
void addCommand(int32_t id, int32_t type, NativeString& args_01, NativeString& args_02, void* nativePtr); | ||
void addCommand(int32_t id, int32_t type, NativeString& args_01, void* nativePtr); | ||
UICommandItem* data(); | ||
int64_t size(); | ||
void clear(); | ||
|
||
private: | ||
int32_t contextId; | ||
std::atomic<bool> update_batched{false}; | ||
std::vector<UICommandItem> queue; | ||
}; | ||
|
||
} // namespace foundation | ||
|
||
#endif // KRAKENBRIDGE_FOUNDATION_UI_COMMAND_BUFFER_H_ |
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.