mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 00:06:44 -04:00
pstats: Add convenience method for ticking current thread only
This commit is contained in:
parent
aea2d6ef45
commit
cf9574b412
@ -373,6 +373,14 @@ main_tick() {
|
|||||||
get_global_pstats()->client_main_tick();
|
get_global_pstats()->client_main_tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A convenience function to call new_frame() for the current thread.
|
||||||
|
*/
|
||||||
|
void PStatClient::
|
||||||
|
thread_tick() {
|
||||||
|
get_global_pstats()->client_thread_tick();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A convenience function to call new_frame() on any threads with the
|
* A convenience function to call new_frame() on any threads with the
|
||||||
* indicated sync_name
|
* indicated sync_name
|
||||||
@ -410,6 +418,19 @@ client_main_tick() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A convenience function to call new_frame() on the current thread.
|
||||||
|
*/
|
||||||
|
void PStatClient::
|
||||||
|
client_thread_tick() {
|
||||||
|
ReMutexHolder holder(_lock);
|
||||||
|
|
||||||
|
if (has_impl()) {
|
||||||
|
PStatThread thread = do_get_current_thread();
|
||||||
|
_impl->new_frame(thread.get_index());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A convenience function to call new_frame() on all of the threads with the
|
* A convenience function to call new_frame() on all of the threads with the
|
||||||
* indicated sync name.
|
* indicated sync name.
|
||||||
@ -1285,6 +1306,10 @@ void PStatClient::
|
|||||||
main_tick() {
|
main_tick() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PStatClient::
|
||||||
|
thread_tick() {
|
||||||
|
}
|
||||||
|
|
||||||
void PStatClient::
|
void PStatClient::
|
||||||
thread_tick(const std::string &) {
|
thread_tick(const std::string &) {
|
||||||
}
|
}
|
||||||
@ -1293,6 +1318,10 @@ void PStatClient::
|
|||||||
client_main_tick() {
|
client_main_tick() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PStatClient::
|
||||||
|
client_thread_tick() {
|
||||||
|
}
|
||||||
|
|
||||||
void PStatClient::
|
void PStatClient::
|
||||||
client_thread_tick(const std::string &sync_name) {
|
client_thread_tick(const std::string &sync_name) {
|
||||||
}
|
}
|
||||||
|
@ -95,9 +95,11 @@ PUBLISHED:
|
|||||||
INLINE static void resume_after_pause();
|
INLINE static void resume_after_pause();
|
||||||
|
|
||||||
static void main_tick();
|
static void main_tick();
|
||||||
|
static void thread_tick();
|
||||||
static void thread_tick(const std::string &sync_name);
|
static void thread_tick(const std::string &sync_name);
|
||||||
|
|
||||||
void client_main_tick();
|
void client_main_tick();
|
||||||
|
void client_thread_tick();
|
||||||
void client_thread_tick(const std::string &sync_name);
|
void client_thread_tick(const std::string &sync_name);
|
||||||
bool client_connect(std::string hostname, int port);
|
bool client_connect(std::string hostname, int port);
|
||||||
void client_disconnect();
|
void client_disconnect();
|
||||||
@ -291,10 +293,12 @@ PUBLISHED:
|
|||||||
INLINE static void resume_after_pause() { }
|
INLINE static void resume_after_pause() { }
|
||||||
|
|
||||||
static void main_tick();
|
static void main_tick();
|
||||||
|
static void thread_tick();
|
||||||
static void thread_tick(const std::string &);
|
static void thread_tick(const std::string &);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void client_main_tick();
|
void client_main_tick();
|
||||||
|
void client_thread_tick();
|
||||||
void client_thread_tick(const std::string &sync_name);
|
void client_thread_tick(const std::string &sync_name);
|
||||||
bool client_connect(std::string hostname, int port);
|
bool client_connect(std::string hostname, int port);
|
||||||
void client_disconnect();
|
void client_disconnect();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user