tahoma2d/toonz/sources/include/tpredictivecachemanager.h
Toshihiro Shimizu 890dddabbd first commit
2016-03-19 02:57:51 +09:00

61 lines
1.3 KiB
C++

#ifndef TPREDICTIVECACHEMANAGER_H
#define TPREDICTIVECACHEMANAGER_H
#include "tfxcachemanager.h"
#include "tgeometry.h"
#include "tfx.h"
#undef DVAPI
#undef DVVAR
#ifdef TFX_EXPORTS
#define DVAPI DV_EXPORT_API
#define DVVAR DV_EXPORT_VAR
#else
#define DVAPI DV_IMPORT_API
#define DVVAR DV_IMPORT_VAR
#endif
//=========================================================================
//======================================
// TPredictiveCacheManager class
//--------------------------------------
/*!
The TPredictiveCacheManager is the TFxCacheManagerDelegate used to cache intermediate
render results due to predictive analysis of the scene schematic.
*/
class DVAPI TPredictiveCacheManager
: public TFxCacheManagerDelegate
{
T_RENDER_RESOURCE_MANAGER
class Imp;
Imp *m_imp;
public:
TPredictiveCacheManager();
~TPredictiveCacheManager();
static TPredictiveCacheManager *instance();
int getMaxTileSize() const;
int getBPP() const;
void setMaxTileSize(int maxTileSize);
void setBPP(int bpp);
void getResource(
TCacheResourceP &resource, const string &alias,
const TFxP &fx, double frame, const TRenderSettings &rs,
ResourceDeclaration *resData);
void onRenderStatusStart(int renderStatus);
void onRenderStatusEnd(int renderStatus);
};
#endif //TPREDICTIVECACHEMANAGER_H