diff options
author | Noel Grandin <noel@peralex.com> | 2016-06-01 12:54:31 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-03 09:08:42 +0000 |
commit | f3c1d240bd4f32d014db00a9864c56f77b7cb127 (patch) | |
tree | ff952e1002ed98d1a0d537193f7bd15aac64b1c9 /canvas | |
parent | 643b70006fd5f6762561696421808f20d4e1e86f (diff) |
loplugin:constantparams
Change-Id: Ib162ba9297b9d900ea42c7e5216e152d3e58a361
Reviewed-on: https://gerrit.libreoffice.org/25769
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_canvas.cxx | 2 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_canvas.hxx | 2 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_canvasbitmap.cxx | 2 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_canvasbitmap.hxx | 2 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_canvascustomsprite.cxx | 15 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_canvascustomsprite.hxx | 2 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_canvashelper.cxx | 2 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_spritecanvas.cxx | 2 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_spritecanvas.hxx | 2 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_surfaceprovider.hxx | 4 |
10 files changed, 15 insertions, 20 deletions
diff --git a/canvas/source/cairo/cairo_canvas.cxx b/canvas/source/cairo/cairo_canvas.cxx index dd65071cfeea..d56256d2f6cd 100644 --- a/canvas/source/cairo/cairo_canvas.cxx +++ b/canvas/source/cairo/cairo_canvas.cxx @@ -157,7 +157,7 @@ namespace cairocanvas return pSurface; } - SurfaceSharedPtr Canvas::changeSurface( bool, bool ) + SurfaceSharedPtr Canvas::changeSurface() { // non-modifiable surface here return SurfaceSharedPtr(); diff --git a/canvas/source/cairo/cairo_canvas.hxx b/canvas/source/cairo/cairo_canvas.hxx index d3536320e7b3..fe712e3adb1b 100644 --- a/canvas/source/cairo/cairo_canvas.hxx +++ b/canvas/source/cairo/cairo_canvas.hxx @@ -135,7 +135,7 @@ namespace cairocanvas virtual ::cairo::SurfaceSharedPtr getSurface() override; virtual ::cairo::SurfaceSharedPtr createSurface( const ::basegfx::B2ISize& rSize, int aContent = CAIRO_CONTENT_COLOR_ALPHA ) override; virtual ::cairo::SurfaceSharedPtr createSurface( ::Bitmap& rBitmap ) override; - virtual ::cairo::SurfaceSharedPtr changeSurface( bool bHasAlpha, bool bCopyContent ) override; + virtual ::cairo::SurfaceSharedPtr changeSurface() override; virtual OutputDevice* getOutputDevice() override; private: diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx b/canvas/source/cairo/cairo_canvasbitmap.cxx index 2e5f88626040..37c8902fe017 100644 --- a/canvas/source/cairo/cairo_canvasbitmap.cxx +++ b/canvas/source/cairo/cairo_canvasbitmap.cxx @@ -86,7 +86,7 @@ namespace cairocanvas return mpSurfaceProvider->createSurface(rBitmap); } - SurfaceSharedPtr CanvasBitmap::changeSurface( bool, bool ) + SurfaceSharedPtr CanvasBitmap::changeSurface() { // non-modifiable surface here return SurfaceSharedPtr(); diff --git a/canvas/source/cairo/cairo_canvasbitmap.hxx b/canvas/source/cairo/cairo_canvasbitmap.hxx index bf5bd3c0b5fd..e6c9f0c8f591 100644 --- a/canvas/source/cairo/cairo_canvasbitmap.hxx +++ b/canvas/source/cairo/cairo_canvasbitmap.hxx @@ -95,7 +95,7 @@ namespace cairocanvas virtual ::cairo::SurfaceSharedPtr getSurface() override; virtual ::cairo::SurfaceSharedPtr createSurface( const ::basegfx::B2ISize& rSize, int aContent = CAIRO_CONTENT_COLOR_ALPHA ) override; virtual ::cairo::SurfaceSharedPtr createSurface( ::Bitmap& rBitmap ) override; - virtual ::cairo::SurfaceSharedPtr changeSurface( bool bHasAlpha, bool bCopyContent ) override; + virtual ::cairo::SurfaceSharedPtr changeSurface() override; virtual OutputDevice* getOutputDevice() override; // RepaintTarget diff --git a/canvas/source/cairo/cairo_canvascustomsprite.cxx b/canvas/source/cairo/cairo_canvascustomsprite.cxx index e527cb486e1b..2fe5fa28e954 100644 --- a/canvas/source/cairo/cairo_canvascustomsprite.cxx +++ b/canvas/source/cairo/cairo_canvascustomsprite.cxx @@ -117,19 +117,14 @@ namespace cairocanvas return mpSpriteCanvas->createSurface(rBitmap); } - SurfaceSharedPtr CanvasCustomSprite::changeSurface( bool bHasAlpha, bool bCopyContent ) + SurfaceSharedPtr CanvasCustomSprite::changeSurface() { - if( !bHasAlpha && !bCopyContent ) - { - SAL_INFO( "canvas.cairo", "replacing sprite background surface"); + SAL_INFO( "canvas.cairo", "replacing sprite background surface"); - mpBufferSurface = mpSpriteCanvas->createSurface( maSize, CAIRO_CONTENT_COLOR ); - maSpriteHelper.setSurface( mpBufferSurface ); - - return mpBufferSurface; - } + mpBufferSurface = mpSpriteCanvas->createSurface( maSize, CAIRO_CONTENT_COLOR ); + maSpriteHelper.setSurface( mpBufferSurface ); - return SurfaceSharedPtr(); + return mpBufferSurface; } OutputDevice* CanvasCustomSprite::getOutputDevice() diff --git a/canvas/source/cairo/cairo_canvascustomsprite.hxx b/canvas/source/cairo/cairo_canvascustomsprite.hxx index a473bf6839ad..d42b68cc057f 100644 --- a/canvas/source/cairo/cairo_canvascustomsprite.hxx +++ b/canvas/source/cairo/cairo_canvascustomsprite.hxx @@ -133,7 +133,7 @@ namespace cairocanvas virtual ::cairo::SurfaceSharedPtr getSurface() override; virtual ::cairo::SurfaceSharedPtr createSurface( const ::basegfx::B2ISize& rSize, int aContent = CAIRO_CONTENT_COLOR_ALPHA ) override; virtual ::cairo::SurfaceSharedPtr createSurface( ::Bitmap& rBitmap ) override; - virtual ::cairo::SurfaceSharedPtr changeSurface( bool bHasAlpha, bool bCopyContent ) override; + virtual ::cairo::SurfaceSharedPtr changeSurface() override; virtual OutputDevice* getOutputDevice() override; private: diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx index 9518f0feb940..cd9a79ed6245 100644 --- a/canvas/source/cairo/cairo_canvashelper.cxx +++ b/canvas/source/cairo/cairo_canvashelper.cxx @@ -1425,7 +1425,7 @@ namespace cairocanvas { SAL_INFO( "canvas.cairo","trying to change surface to rgb"); if( mpSurfaceProvider ) { - SurfaceSharedPtr pNewSurface = mpSurfaceProvider->changeSurface( false, false ); + SurfaceSharedPtr pNewSurface = mpSurfaceProvider->changeSurface(); if( pNewSurface ) setSurface( pNewSurface, false ); diff --git a/canvas/source/cairo/cairo_spritecanvas.cxx b/canvas/source/cairo/cairo_spritecanvas.cxx index 9c6dd667029a..921850dd7fbf 100644 --- a/canvas/source/cairo/cairo_spritecanvas.cxx +++ b/canvas/source/cairo/cairo_spritecanvas.cxx @@ -165,7 +165,7 @@ namespace cairocanvas return SurfaceSharedPtr(); } - SurfaceSharedPtr SpriteCanvas::changeSurface( bool, bool ) + SurfaceSharedPtr SpriteCanvas::changeSurface() { // non-modifiable surface here return SurfaceSharedPtr(); diff --git a/canvas/source/cairo/cairo_spritecanvas.hxx b/canvas/source/cairo/cairo_spritecanvas.hxx index 95a0e467120c..8e41026bd361 100644 --- a/canvas/source/cairo/cairo_spritecanvas.hxx +++ b/canvas/source/cairo/cairo_spritecanvas.hxx @@ -134,7 +134,7 @@ namespace cairocanvas virtual ::cairo::SurfaceSharedPtr getSurface() override; virtual ::cairo::SurfaceSharedPtr createSurface( const ::basegfx::B2ISize& rSize, int aContent = CAIRO_CONTENT_COLOR_ALPHA ) override; virtual ::cairo::SurfaceSharedPtr createSurface( ::Bitmap& rBitmap ) override; - virtual ::cairo::SurfaceSharedPtr changeSurface( bool bHasAlpha, bool bCopyContent ) override; + virtual ::cairo::SurfaceSharedPtr changeSurface() override; virtual OutputDevice* getOutputDevice() override; // RepaintTarget diff --git a/canvas/source/cairo/cairo_surfaceprovider.hxx b/canvas/source/cairo/cairo_surfaceprovider.hxx index 5d0f15f2175c..c2156cc44403 100644 --- a/canvas/source/cairo/cairo_surfaceprovider.hxx +++ b/canvas/source/cairo/cairo_surfaceprovider.hxx @@ -57,10 +57,10 @@ namespace cairocanvas /// create new surface from given bitmap virtual ::cairo::SurfaceSharedPtr createSurface( ::Bitmap& rBitmap ) = 0; - /** convert surface between alpha and non-alpha + /** convert surface from alpha to non-alpha, does not copy content channel. returns new surface on success, NULL otherwise */ - virtual ::cairo::SurfaceSharedPtr changeSurface( bool bHasAlpha, bool bCopyContent ) = 0; + virtual ::cairo::SurfaceSharedPtr changeSurface() = 0; /** Provides the underlying vcl outputdevice this surface renders on */ |