25 #ifndef ODTRVECRESOURCESHARINGPROVIDER
26 #define ODTRVECRESOURCESHARINGPROVIDER
32 #include "ExDrawOrderBase.h"
38 class OdTrVecVisualStyleContainer;
39 class OdTrVecLayerContainer;
45 ,
public OdDrawOrderBaseDeviceMCCallback
55 static bool isAttached(
const OdDrawOrderMetafileBase &bitSet,
const OdTrVecDevice *pDevice);
57 static void attach(OdDrawOrderMetafileBase &bitSet,
const OdTrVecDevice *pDevice);
59 static void detach(OdDrawOrderMetafileBase &bitSet,
const OdTrVecDevice *pDevice);
61 static void eliminate(OdDrawOrderMetafileBase &bitSet,
const OdTrVecDevice *pDevice);
64 static void clear(OdDrawOrderMetafileBase &bitSet);
125 OdTrVecDevice *
findUsage(
const OdDrawOrderMetafileBase &bitSet, OdTrVecDevice *pStartFrom =
NULL)
const;
128 virtual bool shareMetafile(OdTrVecDevice *pRequestedFor, OdDrawOrderMetafileBase &bitSet,
132 virtual bool shareTexture(OdTrVecDevice *pRequestedFor, OdDrawOrderMetafileBase &bitSet,
136 virtual bool shareMaterial(OdTrVecDevice *pRequestedFor, OdDrawOrderMetafileBase &bitSet,
140 virtual bool shareMetafile(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom,
143 virtual bool shareTexture(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom,
146 virtual bool shareMaterial(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom,
195 #define OdTrVecResourceDependency_queryX(TypeOf, BaseClass) \
196 OdRxObject *queryX(const OdRxClass* pClass) const \
198 if (pClass == OdTrVecResourceSharingProvider::ResourceDependency::desc()) \
199 return reinterpret_cast<OdRxObject*>((OdTrVecResourceSharingProvider::ResourceDependency*)this); \
200 return BaseClass::queryX(pClass); \
202 TypeOfResource resourceType() const { return TypeOf; }
OdSmartPtr< OdTrVecResourceSharingProvider > OdTrVecResourceSharingProviderPtr
virtual OdDrawOrderMetafileBase & resourceBitSet()=0
virtual OdTrVisId resourceId() const =0
static OdRxClass * desc()
virtual TypeOfResource resourceType() const =0
OdTrVecVisualStyleContainer * visualStylesCache(OdTrVecDevice *pDevice)
OdTrVisRendition * rendition(OdTrVecDevice *pRequestFor) const
OdTrVecTtfFontsCache * m_pTtfCache
OdTrVecDevice * findUsage(const OdDrawOrderMetafileBase &bitSet, OdTrVecDevice *pStartFrom=NULL) const
OdGsDevice * gsDevice(OdTrVecDevice *pRequestFor) const
OdTrVecLayerContainer * m_pLayerCache
OdTrVecLayerContainer * layersCache(OdTrVecDevice *pDevice)
OdUInt32 m_nSharedDevices
void broadcastFunction(const OdDrawOrderMetafileBase &bitSet, broadcastProc pProc, void *pArg) const
OdTrVecVisualStyleContainer * m_pVSCache
ODRX_USING_HEAP_OPERATORS(OdTrVisSharingProviderClient)
virtual bool shareMetafile(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom, OdTrVisMetafileId metafileId, void *pInternalDataPtr, void *pOriginatorPtr)
virtual bool shareTexture(OdTrVecDevice *pRequestedFor, OdDrawOrderMetafileBase &bitSet, OdTrVisTextureId textureId, void *pInternalDataPtr, void *pOriginatorPtr)
void shareIdRegistration(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom, OdTrVisId id, OdInt32 type)
virtual void openResourceSharing(OdTrVecDevice *pDevice)
virtual bool shareMaterial(OdTrVecDevice *pRequestedFor, OdDrawOrderMetafileBase &bitSet, OdTrVisMaterialId materialId, void *pInternalDataPtr, void *pOriginatorPtr)
void broadcastFunctionForAll(broadcastProc pProc, void *pArg, const OdTrVecDevice *pExclusion=NULL) const
virtual bool shareMetafile(OdTrVecDevice *pRequestedFor, OdDrawOrderMetafileBase &bitSet, OdTrVisMetafileId metafileId, void *pInternalDataPtr, void *pOriginatorPtr)
virtual void onDeleteRequest(onDeleteRequestProc pReqProc, void *pData)
virtual bool shareMaterial(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom, OdTrVisMaterialId materialId, void *pInternalDataPtr, void *pOriginatorPtr)
virtual bool shareTexture(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom, OdTrVisTextureId textureId, void *pInternalDataPtr, void *pOriginatorPtr)
OdTrVecResourceSharingProvider()
OdTrVisRenderClient * renderClient(OdTrVecDevice *pRequestFor) const
OdTrVecTtfFontsCache * ttfFontsCache(OdTrVecDevice *pDevice)
const OdTrVisRendition::ClientSettings & clientSettings(const OdTrVecDevice *pRequestFor) const
bool materialTexturesProc(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom, OdTrVisMaterialId materialId, void *pInternalDataPtr, void *pOriginatorPtr)
bool internalTextureProc(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom, OdTrVisTextureId textureId, void *pInternalDataPtr, void *pOriginatorPtr, OdTrVisTextureDef &resTexture, bool &bCreated)
static OdSmartPtr< OdTrVecResourceSharingProvider > createObject()
~OdTrVecResourceSharingProvider()
void(* broadcastProc)(OdDrawOrderBaseDevice *pDevice, void *pData)
virtual void closeResourceSharing(OdTrVecDevice *pDevice)
bool isResourceSharingOpened(OdTrVecDevice *pDevice) const
OdArray< DeviceEntry > m_rmDevices
bool hasSharedResources() const
typedef void(APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture)
GLuint GLsizei GLsizei GLint GLenum * type
static const OdUInt32 g_nMaxBit
static void attach(OdDrawOrderMetafileBase &bitSet, const OdTrVecDevice *pDevice)
static void clear(OdDrawOrderMetafileBase &bitSet)
static void compress(OdDrawOrderMetafileBase &bitSet, OdUInt32 nBit)
static bool isAttached(const OdDrawOrderMetafileBase &bitSet, const OdTrVecDevice *pDevice)
static void detach(OdDrawOrderMetafileBase &bitSet, const OdTrVecDevice *pDevice)
static const OdUInt32 g_nBitSys
static void eliminate(OdDrawOrderMetafileBase &bitSet, const OdTrVecDevice *pDevice)
DeviceEntry(OdTrVecDevice *pDevice)
OdTrVecDevice * m_pDevice