From 9090dc1f3b27195f5defd35586ac79357992be21 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 18 Jan 2021 18:27:19 +0200 Subject: split OutputDevice from Window as part of a longer-term goal of doing our widget rendering only inside a top-level render- context. I moved all of the OutputDevice-related code that existed in vcl::Window into a new subclass of OutputDevice called WindowOutputDevice. Notes for further work (*) not sure why we are getting an 1x1 surface in SvpSalGraphics::releaseCairoContext, but to fix it I clamp the size there (*) might have to dump VCLXDevice, and move it's code down into VCLXWindow and VCLXVirtualDevice (*) can we remove use of VCLXDevice in other places, in favour of just talking to the VCL code? Change-Id: I105946377f5322677d6f7d0c1c23847178a720b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113204 Tested-by: Jenkins Reviewed-by: Noel Grandin --- cppcanvas/qa/unit/test.cxx | 2 +- cppcanvas/source/wrapper/vclfactory.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cppcanvas') diff --git a/cppcanvas/qa/unit/test.cxx b/cppcanvas/qa/unit/test.cxx index c02d466dfedd..7c5ca6b9d2c6 100644 --- a/cppcanvas/qa/unit/test.cxx +++ b/cppcanvas/qa/unit/test.cxx @@ -37,7 +37,7 @@ void CanvasTest::testComposite() #ifdef LINUX ScopedVclPtrInstance pWin( nullptr, WB_STDWORK ); - uno::Reference xCanvas = pWin->GetCanvas (); + uno::Reference xCanvas = pWin->GetOutDev()->GetCanvas (); if( !xCanvas.is() ) return; // can't get a canvas working at all - truly headless ? diff --git a/cppcanvas/source/wrapper/vclfactory.cxx b/cppcanvas/source/wrapper/vclfactory.cxx index a750b2e88066..825368859d1e 100644 --- a/cppcanvas/source/wrapper/vclfactory.cxx +++ b/cppcanvas/source/wrapper/vclfactory.cxx @@ -45,7 +45,7 @@ namespace cppcanvas SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const vcl::Window& rVCLWindow ) { return std::make_shared( - rVCLWindow.GetSpriteCanvas() ); + rVCLWindow.GetOutDev()->GetSpriteCanvas() ); } SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const uno::Reference< rendering::XSpriteCanvas >& xCanvas ) -- cgit