summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorMark Page <aptitude@btconnect.com>2016-06-09 10:41:10 +0100
committerMichael Stahl <mstahl@redhat.com>2016-06-09 12:56:27 +0000
commit8561f8bfccb73ce4ac834598c4c32ac5c81774e5 (patch)
tree989cee77c19aefcffe126881b238c0136ba317dd /canvas
parentbdd67652b6b60164220c259b5c4dbef1aba85102 (diff)
tdf#96099 Remove various smart pointer typedefs in canvas
Change-Id: Ied6ec5f7830c53a339de985d173c1dec711ac8f7 Reviewed-on: https://gerrit.libreoffice.org/26092 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/directx/dx_9rm.cxx12
-rw-r--r--canvas/source/directx/dx_canvascustomsprite.cxx2
-rw-r--r--canvas/source/directx/dx_canvascustomsprite.hxx2
-rw-r--r--canvas/source/directx/dx_spritecanvashelper.cxx2
-rw-r--r--canvas/source/directx/dx_spritecanvashelper.hxx4
-rw-r--r--canvas/source/directx/dx_spritedevicehelper.hxx4
-rw-r--r--canvas/source/directx/dx_surfacebitmap.cxx2
-rw-r--r--canvas/source/directx/dx_surfacebitmap.hxx6
-rw-r--r--canvas/source/tools/page.cxx2
-rw-r--r--canvas/source/tools/page.hxx16
-rw-r--r--canvas/source/tools/pagemanager.hxx6
-rw-r--r--canvas/source/tools/surface.cxx8
-rw-r--r--canvas/source/tools/surface.hxx4
-rw-r--r--canvas/source/tools/surfaceproxy.cxx2
-rw-r--r--canvas/source/tools/surfaceproxy.hxx4
-rw-r--r--canvas/source/tools/surfaceproxymanager.cxx8
16 files changed, 42 insertions, 42 deletions
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index 6beb18312a8c..6e7ba8c22cf4 100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -184,7 +184,7 @@ namespace dxcanvas
virtual void resize( const ::basegfx::B2IRange& rect );
virtual ::basegfx::B2IVector getPageSize();
- virtual ::canvas::ISurfaceSharedPtr createSurface( const ::basegfx::B2IVector& surfaceSize );
+ virtual ::std::shared_ptr<canvas::ISurface> createSurface( const ::basegfx::B2IVector& surfaceSize );
virtual void beginPrimitive( PrimitiveType eType );
virtual void endPrimitive();
virtual void pushVertex( const ::canvas::Vertex& vertex );
@@ -213,7 +213,7 @@ namespace dxcanvas
COMReference<IDirect3D9> mpDirect3D9;
COMReference<IDirect3DSwapChain9> mpSwapChain;
COMReference<IDirect3DVertexBuffer9> mpVertexBuffer;
- ::canvas::ISurfaceSharedPtr mpTexture;
+ ::std::shared_ptr<canvas::ISurface> mpTexture;
VclPtr<SystemChildWindow> mpWindow;
::basegfx::B2IVector maSize;
typedef std::vector<canvas::Vertex> vertexCache_t;
@@ -521,7 +521,7 @@ namespace dxcanvas
::basegfx::B2IVector aPageSize(maPageSize);
while(true)
{
- mpTexture = ::canvas::ISurfaceSharedPtr(
+ mpTexture = ::std::shared_ptr<canvas::ISurface>(
new DXSurface(*this,aPageSize));
if(mpTexture->isValid())
break;
@@ -984,13 +984,13 @@ namespace dxcanvas
// DXRenderModule::createSurface
- ::canvas::ISurfaceSharedPtr DXRenderModule::createSurface( const ::basegfx::B2IVector& surfaceSize )
+ ::std::shared_ptr<canvas::ISurface> DXRenderModule::createSurface( const ::basegfx::B2IVector& surfaceSize )
{
// TODO(P2): get rid of those fine-grained locking
::osl::MutexGuard aGuard( maMutex );
if(isDisposed())
- return ::canvas::ISurfaceSharedPtr();
+ return ::std::shared_ptr<canvas::ISurface>();
const ::basegfx::B2IVector& rPageSize( getPageSize() );
::basegfx::B2ISize aSize(surfaceSize);
@@ -1002,7 +1002,7 @@ namespace dxcanvas
if(mpTexture.use_count() == 1)
return mpTexture;
- return ::canvas::ISurfaceSharedPtr( new DXSurface(*this,aSize) );
+ return ::std::shared_ptr<canvas::ISurface>( new DXSurface(*this,aSize) );
}
diff --git a/canvas/source/directx/dx_canvascustomsprite.cxx b/canvas/source/directx/dx_canvascustomsprite.cxx
index e56237a7ac98..026a6634a606 100644
--- a/canvas/source/directx/dx_canvascustomsprite.cxx
+++ b/canvas/source/directx/dx_canvascustomsprite.cxx
@@ -40,7 +40,7 @@ namespace dxcanvas
CanvasCustomSprite::CanvasCustomSprite( const css::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rRefDevice,
const IDXRenderModuleSharedPtr& rRenderModule,
- const ::canvas::ISurfaceProxyManagerSharedPtr& rSurfaceProxy,
+ const ::std::shared_ptr<canvas::ISurfaceProxyManager>& rSurfaceProxy,
bool bShowSpriteBounds ) :
mpSpriteCanvas( rRefDevice ),
mpSurface()
diff --git a/canvas/source/directx/dx_canvascustomsprite.hxx b/canvas/source/directx/dx_canvascustomsprite.hxx
index 06e4b98fee98..c53c84616788 100644
--- a/canvas/source/directx/dx_canvascustomsprite.hxx
+++ b/canvas/source/directx/dx_canvascustomsprite.hxx
@@ -99,7 +99,7 @@ namespace dxcanvas
CanvasCustomSprite( const css::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rRefDevice,
const IDXRenderModuleSharedPtr& rRenderModule,
- const ::canvas::ISurfaceProxyManagerSharedPtr& rSurfaceProxy,
+ const ::std::shared_ptr<canvas::ISurfaceProxyManager>& rSurfaceProxy,
bool bShowSpriteBounds );
virtual void disposeThis() override;
diff --git a/canvas/source/directx/dx_spritecanvashelper.cxx b/canvas/source/directx/dx_spritecanvashelper.cxx
index 3803671f034b..a36f3aac8643 100644
--- a/canvas/source/directx/dx_spritecanvashelper.cxx
+++ b/canvas/source/directx/dx_spritecanvashelper.cxx
@@ -79,7 +79,7 @@ namespace dxcanvas
void SpriteCanvasHelper::init( SpriteCanvas& rParent,
::canvas::SpriteRedrawManager& rManager,
const IDXRenderModuleSharedPtr& rRenderModule,
- const ::canvas::ISurfaceProxyManagerSharedPtr& rSurfaceProxy,
+ const ::std::shared_ptr<canvas::ISurfaceProxyManager>& rSurfaceProxy,
const DXSurfaceBitmapSharedPtr& rBackBuffer,
const ::basegfx::B2ISize& rOutputOffset )
{
diff --git a/canvas/source/directx/dx_spritecanvashelper.hxx b/canvas/source/directx/dx_spritecanvashelper.hxx
index 1b7314202316..d3f48ab0cfa9 100644
--- a/canvas/source/directx/dx_spritecanvashelper.hxx
+++ b/canvas/source/directx/dx_spritecanvashelper.hxx
@@ -46,7 +46,7 @@ namespace dxcanvas
void init( SpriteCanvas& rParent,
::canvas::SpriteRedrawManager& rManager,
const IDXRenderModuleSharedPtr& rRenderModule,
- const ::canvas::ISurfaceProxyManagerSharedPtr& rSurfaceProxy,
+ const ::std::shared_ptr<canvas::ISurfaceProxyManager>& rSurfaceProxy,
const DXSurfaceBitmapSharedPtr& rBackBuffer,
const ::basegfx::B2ISize& rOutputOffset );
@@ -134,7 +134,7 @@ namespace dxcanvas
/// DX device, handling all low-level rendering
IDXRenderModuleSharedPtr mpRenderModule;
- ::canvas::ISurfaceProxyManagerSharedPtr mpSurfaceProxy;
+ ::std::shared_ptr<canvas::ISurfaceProxyManager> mpSurfaceProxy;
/// Backbuffer, contains the static canvas render output
DXSurfaceBitmapSharedPtr mpBackBuffer;
diff --git a/canvas/source/directx/dx_spritedevicehelper.hxx b/canvas/source/directx/dx_spritedevicehelper.hxx
index 5716e5c788ae..6f3608e62f1d 100644
--- a/canvas/source/directx/dx_spritedevicehelper.hxx
+++ b/canvas/source/directx/dx_spritedevicehelper.hxx
@@ -68,7 +68,7 @@ namespace dxcanvas
const IDXRenderModuleSharedPtr& getRenderModule() const { return mpRenderModule; }
const DXSurfaceBitmapSharedPtr& getBackBuffer() const { return mpBackBuffer; }
- const ::canvas::ISurfaceProxyManagerSharedPtr &getSurfaceProxy() const { return mpSurfaceProxyManager; }
+ const ::std::shared_ptr<canvas::ISurfaceProxyManager> &getSurfaceProxy() const { return mpSurfaceProxyManager; }
css::uno::Any isAccelerated() const;
@@ -89,7 +89,7 @@ namespace dxcanvas
DXSurfaceBitmapSharedPtr mpBackBuffer;
/// Instance passing out HW textures
- ::canvas::ISurfaceProxyManagerSharedPtr mpSurfaceProxyManager;
+ ::std::shared_ptr<canvas::ISurfaceProxyManager> mpSurfaceProxyManager;
/// Our encapsulation interface to DirectX
IDXRenderModuleSharedPtr mpRenderModule;
diff --git a/canvas/source/directx/dx_surfacebitmap.cxx b/canvas/source/directx/dx_surfacebitmap.cxx
index fac6d9e0d68b..df2962f531d3 100644
--- a/canvas/source/directx/dx_surfacebitmap.cxx
+++ b/canvas/source/directx/dx_surfacebitmap.cxx
@@ -183,7 +183,7 @@ namespace dxcanvas
DXSurfaceBitmap::DXSurfaceBitmap( const ::basegfx::B2IVector& rSize,
- const canvas::ISurfaceProxyManagerSharedPtr& rMgr,
+ const std::shared_ptr<canvas::ISurfaceProxyManager>& rMgr,
const IDXRenderModuleSharedPtr& rRenderModule,
bool bWithAlpha ) :
mpGdiPlusUser( GDIPlusUser::createInstance() ),
diff --git a/canvas/source/directx/dx_surfacebitmap.hxx b/canvas/source/directx/dx_surfacebitmap.hxx
index 4c2ced00c6ef..85c067c595ba 100644
--- a/canvas/source/directx/dx_surfacebitmap.hxx
+++ b/canvas/source/directx/dx_surfacebitmap.hxx
@@ -33,7 +33,7 @@ namespace dxcanvas
{
public:
DXSurfaceBitmap( const ::basegfx::B2IVector& rSize,
- const canvas::ISurfaceProxyManagerSharedPtr& rMgr,
+ const std::shared_ptr<canvas::ISurfaceProxyManager>& rMgr,
const IDXRenderModuleSharedPtr& rRenderModule,
bool bWithAlpha );
@@ -100,7 +100,7 @@ namespace dxcanvas
// pointer to the surface manager, needed in case clients
// want to resize the bitmap.
- canvas::ISurfaceProxyManagerSharedPtr mpSurfaceManager;
+ std::shared_ptr<canvas::ISurfaceProxyManager> mpSurfaceManager;
// access point to the surface proxy which handles
// the hardware-dependent rendering stuff.
@@ -118,7 +118,7 @@ namespace dxcanvas
GraphicsSharedPtr mpGraphics;
// internal implementation of the iColorBuffer interface
- canvas::IColorBufferSharedPtr mpColorBuffer;
+ std::shared_ptr<canvas::IColorBuffer> mpColorBuffer;
// indicates whether the associated surface needs
// to refresh its contents or not. in other words,
diff --git a/canvas/source/tools/page.cxx b/canvas/source/tools/page.cxx
index d9b7c08f3f75..4d83851d806a 100644
--- a/canvas/source/tools/page.cxx
+++ b/canvas/source/tools/page.cxx
@@ -23,7 +23,7 @@
namespace canvas
{
- Page::Page( const IRenderModuleSharedPtr &rRenderModule ) :
+ Page::Page( const std::shared_ptr<IRenderModule> &rRenderModule ) :
mpRenderModule(rRenderModule),
mpSurface(rRenderModule->createSurface(::basegfx::B2ISize()))
{
diff --git a/canvas/source/tools/page.hxx b/canvas/source/tools/page.hxx
index f2c3ff054214..70ee866d3cb4 100644
--- a/canvas/source/tools/page.hxx
+++ b/canvas/source/tools/page.hxx
@@ -42,20 +42,20 @@ namespace canvas
class Page
{
public:
- explicit Page( const IRenderModuleSharedPtr& rRenderModule );
+ explicit Page( const std::shared_ptr<IRenderModule>& rRenderModule );
FragmentSharedPtr allocateSpace( const ::basegfx::B2ISize& rSize );
bool nakedFragment( const FragmentSharedPtr& pFragment );
void free( const FragmentSharedPtr& pFragment );
- const ISurfaceSharedPtr& getSurface() const { return mpSurface; }
+ const std::shared_ptr<ISurface>& getSurface() const { return mpSurface; }
bool isValid() const;
void validate();
private:
typedef std::list<FragmentSharedPtr> FragmentContainer_t;
- IRenderModuleSharedPtr mpRenderModule;
- ISurfaceSharedPtr mpSurface;
+ std::shared_ptr<IRenderModule> mpRenderModule;
+ std::shared_ptr<ISurface> mpSurface;
FragmentContainer_t mpFragments;
bool insert( SurfaceRect& r );
@@ -92,7 +92,7 @@ namespace canvas
const SurfaceRect& getRect() const { return maRect; }
const ::basegfx::B2IPoint& getPos() const { return maRect.maPos; }
const ::basegfx::B2ISize& getSize() const { return maRect.maSize; }
- void setColorBuffer( const IColorBufferSharedPtr& pColorBuffer ) { mpBuffer=pColorBuffer; }
+ void setColorBuffer( const std::shared_ptr<IColorBuffer>& pColorBuffer ) { mpBuffer=pColorBuffer; }
void setSourceOffset( const ::basegfx::B2IPoint& rOffset ) { maSourceOffset=rOffset; }
void setPage( Page* pPage ) { mpPage=pPage; }
@@ -112,7 +112,7 @@ namespace canvas
if(!(mpPage))
return false;
- ISurfaceSharedPtr pSurface(mpPage->getSurface());
+ std::shared_ptr<ISurface> pSurface(mpPage->getSurface());
// select this surface before wiping the contents
// since a specific implementation could trigger
@@ -129,7 +129,7 @@ namespace canvas
if(!(mpPage))
return false;
- ISurfaceSharedPtr pSurface(mpPage->getSurface());
+ std::shared_ptr<ISurface> pSurface(mpPage->getSurface());
return pSurface->update( maRect.maPos,
::basegfx::B2IRectangle(
@@ -141,7 +141,7 @@ namespace canvas
private:
Page* mpPage;
SurfaceRect maRect;
- IColorBufferSharedPtr mpBuffer;
+ std::shared_ptr<IColorBuffer> mpBuffer;
::basegfx::B2IPoint maSourceOffset;
};
}
diff --git a/canvas/source/tools/pagemanager.hxx b/canvas/source/tools/pagemanager.hxx
index 03a5470ea2af..d89754d51ec6 100644
--- a/canvas/source/tools/pagemanager.hxx
+++ b/canvas/source/tools/pagemanager.hxx
@@ -32,7 +32,7 @@ namespace canvas
class PageManager
{
public:
- explicit PageManager(const canvas::IRenderModuleSharedPtr& rRenderModule)
+ explicit PageManager(const std::shared_ptr<canvas::IRenderModule>& rRenderModule)
: mpRenderModule(rRenderModule)
{
}
@@ -41,7 +41,7 @@ namespace canvas
// accelerated page, e.g. OpenGL texture.
::basegfx::B2ISize getPageSize() const;
- const canvas::IRenderModuleSharedPtr& getRenderModule() const { return mpRenderModule; }
+ const std::shared_ptr<canvas::IRenderModule>& getRenderModule() const { return mpRenderModule; }
FragmentSharedPtr allocateSpace( const ::basegfx::B2ISize& rSize );
void free( const FragmentSharedPtr& pFragment );
@@ -53,7 +53,7 @@ namespace canvas
private:
// the pagemanager needs access to the rendermodule
// since we query for system resources from it.
- canvas::IRenderModuleSharedPtr mpRenderModule;
+ std::shared_ptr<canvas::IRenderModule> mpRenderModule;
// here we collect all fragments that will be created
// since we need them for relocation purposes.
diff --git a/canvas/source/tools/surface.cxx b/canvas/source/tools/surface.cxx
index c1ff5a218f65..ec924f7d4e49 100644
--- a/canvas/source/tools/surface.cxx
+++ b/canvas/source/tools/surface.cxx
@@ -28,7 +28,7 @@
namespace canvas
{
Surface::Surface( const PageManagerSharedPtr& rPageManager,
- const IColorBufferSharedPtr& rColorBuffer,
+ const std::shared_ptr<IColorBuffer>& rColorBuffer,
const ::basegfx::B2IPoint& rPos,
const ::basegfx::B2ISize& rSize ) :
mpColorBuffer(rColorBuffer),
@@ -93,7 +93,7 @@ namespace canvas
const ::basegfx::B2DPoint& rPos,
const ::basegfx::B2DHomMatrix& rTransform )
{
- IRenderModuleSharedPtr pRenderModule(mpPageManager->getRenderModule());
+ std::shared_ptr<IRenderModule> pRenderModule(mpPageManager->getRenderModule());
RenderModuleGuard aGuard( pRenderModule );
@@ -193,7 +193,7 @@ namespace canvas
if( rArea.isEmpty() )
return true; // immediate exit for empty area
- IRenderModuleSharedPtr pRenderModule(mpPageManager->getRenderModule());
+ std::shared_ptr<IRenderModule> pRenderModule(mpPageManager->getRenderModule());
RenderModuleGuard aGuard( pRenderModule );
@@ -310,7 +310,7 @@ namespace canvas
const ::basegfx::B2DPolygon& rClipPoly,
const ::basegfx::B2DHomMatrix& rTransform )
{
- IRenderModuleSharedPtr pRenderModule(mpPageManager->getRenderModule());
+ std::shared_ptr<IRenderModule> pRenderModule(mpPageManager->getRenderModule());
RenderModuleGuard aGuard( pRenderModule );
diff --git a/canvas/source/tools/surface.hxx b/canvas/source/tools/surface.hxx
index d6b8d90995e0..1b7a463fc588 100644
--- a/canvas/source/tools/surface.hxx
+++ b/canvas/source/tools/surface.hxx
@@ -46,7 +46,7 @@ namespace canvas
public:
Surface( const PageManagerSharedPtr& rPageManager,
- const IColorBufferSharedPtr& rColorBuffer,
+ const std::shared_ptr<IColorBuffer>& rColorBuffer,
const ::basegfx::B2IPoint& rPos,
const ::basegfx::B2ISize& rSize );
~Surface();
@@ -111,7 +111,7 @@ namespace canvas
const ::basegfx::B2DHomMatrix& rTransform );
private:
- IColorBufferSharedPtr mpColorBuffer;
+ std::shared_ptr<IColorBuffer> mpColorBuffer;
// invoking any of the above defined 'draw' methods
// will forward primitive commands to the rendermodule.
diff --git a/canvas/source/tools/surfaceproxy.cxx b/canvas/source/tools/surfaceproxy.cxx
index a2ffd3204a42..a9fb781fcb9a 100644
--- a/canvas/source/tools/surfaceproxy.cxx
+++ b/canvas/source/tools/surfaceproxy.cxx
@@ -27,7 +27,7 @@
namespace canvas
{
- SurfaceProxy::SurfaceProxy( const canvas::IColorBufferSharedPtr& pBuffer,
+ SurfaceProxy::SurfaceProxy( const std::shared_ptr<canvas::IColorBuffer>& pBuffer,
const PageManagerSharedPtr& pPageManager ) :
mpPageManager( pPageManager ),
maSurfaceList(),
diff --git a/canvas/source/tools/surfaceproxy.hxx b/canvas/source/tools/surfaceproxy.hxx
index f89850d92af4..09cd36d7f6b0 100644
--- a/canvas/source/tools/surfaceproxy.hxx
+++ b/canvas/source/tools/surfaceproxy.hxx
@@ -39,7 +39,7 @@ namespace canvas
{
public:
- SurfaceProxy( const canvas::IColorBufferSharedPtr& pBuffer,
+ SurfaceProxy( const std::shared_ptr<canvas::IColorBuffer>& pBuffer,
const PageManagerSharedPtr &pPageManager );
// ISurfaceProxy interface
@@ -112,7 +112,7 @@ namespace canvas
// pointer to the source of image data
// which always is stored in system memory,
// 32bit rgba and can have any size.
- canvas::IColorBufferSharedPtr mpBuffer;
+ std::shared_ptr<canvas::IColorBuffer> mpBuffer;
};
}
diff --git a/canvas/source/tools/surfaceproxymanager.cxx b/canvas/source/tools/surfaceproxymanager.cxx
index 1e318f941125..d0ddfff51f66 100644
--- a/canvas/source/tools/surfaceproxymanager.cxx
+++ b/canvas/source/tools/surfaceproxymanager.cxx
@@ -30,7 +30,7 @@ namespace canvas
{
public:
- explicit SurfaceProxyManager( const IRenderModuleSharedPtr& rRenderModule ) :
+ explicit SurfaceProxyManager( const std::shared_ptr<IRenderModule>& rRenderModule ) :
mpPageManager( new PageManager(rRenderModule) )
{
}
@@ -48,7 +48,7 @@ namespace canvas
texture may be distributed to several real hardware
surfaces.
*/
- virtual std::shared_ptr<ISurfaceProxy> createSurfaceProxy( const IColorBufferSharedPtr& pBuffer ) const override
+ virtual std::shared_ptr<ISurfaceProxy> createSurfaceProxy( const std::shared_ptr<IColorBuffer>& pBuffer ) const override
{
// not much to do for now, simply allocate a new surface
// proxy from our internal pool and initialize this thing
@@ -60,9 +60,9 @@ namespace canvas
PageManagerSharedPtr mpPageManager;
};
- ISurfaceProxyManagerSharedPtr createSurfaceProxyManager( const IRenderModuleSharedPtr& rRenderModule )
+ std::shared_ptr<ISurfaceProxyManager> createSurfaceProxyManager( const std::shared_ptr<IRenderModule>& rRenderModule )
{
- return ISurfaceProxyManagerSharedPtr(
+ return std::shared_ptr<ISurfaceProxyManager>(
new SurfaceProxyManager(
rRenderModule));
}