summaryrefslogtreecommitdiff
path: root/core/fxge/include/fx_ge.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/include/fx_ge.h')
-rw-r--r--core/fxge/include/fx_ge.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/fxge/include/fx_ge.h b/core/fxge/include/fx_ge.h
index dbc4fd0a43..aceaa76a94 100644
--- a/core/fxge/include/fx_ge.h
+++ b/core/fxge/include/fx_ge.h
@@ -214,9 +214,11 @@ class CFX_RenderDevice {
CFX_RenderDevice();
virtual ~CFX_RenderDevice();
- void Flush();
- void SetDeviceDriver(IFX_RenderDeviceDriver* pDriver);
- IFX_RenderDeviceDriver* GetDeviceDriver() const { return m_pDeviceDriver; }
+ // Take ownership of |pDriver|.
+ void SetDeviceDriver(std::unique_ptr<IFX_RenderDeviceDriver> pDriver);
+ IFX_RenderDeviceDriver* GetDeviceDriver() const {
+ return m_pDeviceDriver.get();
+ }
FX_BOOL StartRendering();
void EndRendering();
@@ -400,7 +402,7 @@ class CFX_RenderDevice {
int m_RenderCaps;
int m_DeviceClass;
FX_RECT m_ClipBox;
- IFX_RenderDeviceDriver* m_pDeviceDriver;
+ std::unique_ptr<IFX_RenderDeviceDriver> m_pDeviceDriver;
};
class CFX_FxgeDevice : public CFX_RenderDevice {