Update git submodules
[LibreOffice.git] / canvas / source / opengl / ogl_canvasbitmap.cxx
blob0020cc39a9cdb2004a8018ded84a40e269d1d076
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #include <sal/config.h>
12 #include <comphelper/diagnose_ex.hxx>
14 #include <utility>
16 #include "ogl_canvasbitmap.hxx"
19 using namespace ::com::sun::star;
21 namespace oglcanvas
23 CanvasBitmap::CanvasBitmap( const geometry::IntegerSize2D& rSize,
24 SpriteCanvasRef rDevice,
25 SpriteDeviceHelper& rDeviceHelper ) :
26 mpDevice(std::move( rDevice ))
28 ENSURE_OR_THROW( mpDevice.is(),
29 "CanvasBitmap::CanvasBitmap(): Invalid surface or device" );
31 maCanvasHelper.init( *mpDevice, rDeviceHelper, rSize );
34 CanvasBitmap::CanvasBitmap( const CanvasBitmap& rSrc ) :
35 mpDevice( rSrc.mpDevice )
37 maCanvasHelper = rSrc.maCanvasHelper;
40 void CanvasBitmap::disposeThis()
42 mpDevice.clear();
44 // forward to parent
45 CanvasBitmapBaseT::disposeThis();
48 bool CanvasBitmap::renderRecordedActions() const
50 return maCanvasHelper.renderRecordedActions();
54 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */