summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-30 09:20:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-30 10:57:04 +0100
commita4b60b78ea36d55a2abf0e5efccd8530568d2209 (patch)
tree9468dc489d37b11e14e190502816f3ed55edd0c9 /canvas
parent034a462475c2878e1eba13f10b2fcaf8c1755c4a (diff)
loplugin:returnconstant
Change-Id: I5b859de6ccd908eee4356acbe1f12b441ab36df3 Reviewed-on: https://gerrit.libreoffice.org/62539 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/opengl/ogl_spritedevicehelper.cxx9
-rw-r--r--canvas/source/opengl/ogl_spritedevicehelper.hxx2
-rw-r--r--canvas/source/vcl/textlayout.cxx4
-rw-r--r--canvas/source/vcl/textlayout.hxx2
4 files changed, 3 insertions, 14 deletions
diff --git a/canvas/source/opengl/ogl_spritedevicehelper.cxx b/canvas/source/opengl/ogl_spritedevicehelper.cxx
index 82345bd7045a..cbbe93a134e3 100644
--- a/canvas/source/opengl/ogl_spritedevicehelper.cxx
+++ b/canvas/source/opengl/ogl_spritedevicehelper.cxx
@@ -273,8 +273,7 @@ namespace oglcanvas
if( !bIsVisible || !mxContext->isInitialized() || !mpSpriteCanvas )
return false;
- if( !activateWindowContext() )
- return false;
+ mxContext->makeCurrent();
SystemChildWindow* pChildWindow = mxContext->getChildWindow();
const ::Size& rOutputSize = pChildWindow->GetSizePixel();
@@ -503,12 +502,6 @@ namespace oglcanvas
setupUniforms(mnRectangularTwoColorGradientProgram, pColors[0], pColors[1], rTexTransform);
}
- bool SpriteDeviceHelper::activateWindowContext()
- {
- mxContext->makeCurrent();
- return true;
- }
-
namespace
{
diff --git a/canvas/source/opengl/ogl_spritedevicehelper.hxx b/canvas/source/opengl/ogl_spritedevicehelper.hxx
index ddc6e27a3e04..4d3664db6eb4 100644
--- a/canvas/source/opengl/ogl_spritedevicehelper.hxx
+++ b/canvas/source/opengl/ogl_spritedevicehelper.hxx
@@ -112,8 +112,6 @@ namespace oglcanvas
/// Get instance of internal texture cache
TextureCache& getTextureCache() const;
- bool activateWindowContext();
-
private:
/// Pointer to sprite canvas (owner of this helper), needed to create bitmaps
SpriteCanvas* mpSpriteCanvas;
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index 1a659f463ab7..18307fce9c0a 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -321,7 +321,7 @@ namespace vclcanvas
return maText;
}
- bool TextLayout::draw( OutputDevice& rOutDev,
+ void TextLayout::draw( OutputDevice& rOutDev,
const Point& rOutpos,
const rendering::ViewState& viewState,
const rendering::RenderState& renderState ) const
@@ -352,8 +352,6 @@ namespace vclcanvas
::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) );
}
-
- return true;
}
namespace
diff --git a/canvas/source/vcl/textlayout.hxx b/canvas/source/vcl/textlayout.hxx
index e6a661331101..8f5cd1772a4e 100644
--- a/canvas/source/vcl/textlayout.hxx
+++ b/canvas/source/vcl/textlayout.hxx
@@ -82,7 +82,7 @@ namespace vclcanvas
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
- bool draw( OutputDevice& rOutDev,
+ void draw( OutputDevice& rOutDev,
const Point& rOutpos,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState ) const;