22#include <com/sun/star/rendering/XCanvas.hpp>
23#include <com/sun/star/rendering/RepaintResult.hpp>
31using namespace ::
cairo;
37 const rendering::ViewState& rUsedViewState,
38 rendering::RenderState aUsedRenderState,
39 const uno::Reference< rendering::XCanvas >&
rTarget ) :
40 CachedPrimitiveBase( rUsedViewState,
rTarget ),
42 maRenderState(std::move( aUsedRenderState ))
48 CachedPrimitiveBase::disposing(rGuard);
52 const rendering::ViewState& ,
53 const uno::Reference< rendering::XCanvas >& rTargetCanvas,
54 bool bSameViewTransform )
57 "CachedBitmap::doRedraw(): base called with changed view transform "
58 "(told otherwise during construction)" );
60 RepaintTarget* pTarget =
dynamic_cast< RepaintTarget*
>(rTargetCanvas.get());
63 "CachedBitmap::redraw(): cannot cast target to RepaintTarget" );
70 return rendering::RepaintResult::FAILED;
73 return rendering::RepaintResult::REDRAWN;
virtual void disposing(std::unique_lock< std::mutex > &rGuard) override
Dispose all internal references.
::cairo::SurfaceSharedPtr mpSurface
const css::rendering::RenderState maRenderState
CachedBitmap(::cairo::SurfaceSharedPtr pSurface, const css::rendering::ViewState &rUsedViewState, css::rendering::RenderState aUsedRenderState, const css::uno::Reference< css::rendering::XCanvas > &rTarget)
Create an XCachedPrimitive for given GraphicObject.
virtual ::sal_Int8 doRedraw(const css::rendering::ViewState &rNewState, const css::rendering::ViewState &rOldState, const css::uno::Reference< css::rendering::XCanvas > &rTargetCanvas, bool bSameViewTransform) override
Actually perform the requested redraw.
#define ENSURE_OR_THROW(c, m)
sal::systools::COMReference< surface_type > mpSurface
std::shared_ptr< Surface > SurfaceSharedPtr