18 #ifndef ION_GFXUTILS_FRAME_H_
19 #define ION_GFXUTILS_FRAME_H_
24 #include "base/integral_types.h"
37 typedef std::function<void(const Frame& frame)>
Callback;
62 void AddPreFrameCallback(
const std::string& key,
const Callback& callback);
63 void AddPostFrameCallback(
const std::string& key,
const Callback& callback);
68 bool RemovePreFrameCallback(
const std::string& key);
69 bool RemovePostFrameCallback(
const std::string& key);
79 CallbackMap pre_frame_callbacks_;
80 CallbackMap post_frame_callbacks_;
89 #endif // ION_GFXUTILS_FRAME_H_
base::ReferentPtr< Frame >::Type FramePtr
Convenience typedef for shared pointer to a Frame.
Thread-safe abstract base class.
Frame manages an application-defined frame of execution.
uint64 GetCounter() const
Gets/resets the frame counter.
std::function< void(const Frame &frame)> Callback
Callback that can be invoked at the beginning or end of a frame.
bool IsInFrame() const
Returns true if Begin() was called and End() was not.
A SharedPtr is a smart shared pointer to an instance of some class that implements reference counting...