Shinya Kitaoka 810553
#pragma once
Shinya Kitaoka 810553
Toshihiro Shimizu 890ddd
#ifndef TPREDICTIVECACHEMANAGER_H
Toshihiro Shimizu 890ddd
#define TPREDICTIVECACHEMANAGER_H
Toshihiro Shimizu 890ddd
Shinya Kitaoka 262a92
#include <memory></memory>
Shinya Kitaoka 262a92
Toshihiro Shimizu 890ddd
#include "tfxcachemanager.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tgeometry.h"
Toshihiro Shimizu 890ddd
#include "tfx.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#undef DVAPI
Toshihiro Shimizu 890ddd
#undef DVVAR
Toshihiro Shimizu 890ddd
#ifdef TFX_EXPORTS
Toshihiro Shimizu 890ddd
#define DVAPI DV_EXPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_EXPORT_VAR
Toshihiro Shimizu 890ddd
#else
Toshihiro Shimizu 890ddd
#define DVAPI DV_IMPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_IMPORT_VAR
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=========================================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//======================================
Toshihiro Shimizu 890ddd
//    TPredictiveCacheManager class
Toshihiro Shimizu 890ddd
//--------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*!
Shinya Kitaoka 120a6e
The TPredictiveCacheManager is the TFxCacheManagerDelegate used to cache
Shinya Kitaoka 120a6e
intermediate
Toshihiro Shimizu 890ddd
render results due to predictive analysis of the scene schematic.
Toshihiro Shimizu 890ddd
*/
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI TPredictiveCacheManager final : public TFxCacheManagerDelegate {
Shinya Kitaoka 120a6e
  T_RENDER_RESOURCE_MANAGER
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  class Imp;
Shinya Kitaoka 120a6e
  std::unique_ptr<imp> m_imp;</imp>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TPredictiveCacheManager();
Shinya Kitaoka 120a6e
  ~TPredictiveCacheManager();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  static TPredictiveCacheManager *instance();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int getMaxTileSize() const;
Shinya Kitaoka 120a6e
  int getBPP() const;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setMaxTileSize(int maxTileSize);
Shinya Kitaoka 120a6e
  void setBPP(int bpp);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void getResource(TCacheResourceP &resource, const std::string &alias,
Shinya Kitaoka 120a6e
                   const TFxP &fx, double frame, const TRenderSettings &rs,
Shinya Kitaoka 473e70
                   ResourceDeclaration *resData) override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void onRenderStatusStart(int renderStatus) override;
Shinya Kitaoka 473e70
  void onRenderStatusEnd(int renderStatus) override;
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#endif  // TPREDICTIVECACHEMANAGER_H