From ec1a0354050491e84792a30df75d361803b62b1f Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 4 Aug 2015 14:55:57 +0200 Subject: tdf#92982 vcl rendercontext: no need to tweak map mode in PaintBuffer() This used to be necessary, but now that the "copy settings from the window to the buffer" is always guarded with PaintBufferGuard, it's actually one of the places that do modify the buffer settings without undoing that later. Change-Id: I7fde878635ffc7de7027d6d8f8de47935fc4870e --- vcl/source/window/paint.cxx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 68ae9971b2e6..c0ba70a22d8e 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -129,7 +129,6 @@ private: vcl::Region* m_pChildRegion; Rectangle m_aSelectionRect; Rectangle m_aPaintRect; - MapMode m_aPaintRectMapMode; vcl::Region m_aPaintRegion; sal_uInt16 m_nPaintFlags; bool m_bPop : 1; @@ -205,9 +204,6 @@ void PaintHelper::StartBufferedPaint() pFrameData->mbInBufferedPaint = true; m_bStartedBufferedPaint = true; - - // Remember what was the map mode of m_aPaintRect. - m_aPaintRectMapMode = m_pWindow->GetMapMode(); } void PaintHelper::PaintBuffer() @@ -223,12 +219,6 @@ void PaintHelper::PaintBuffer() // window either above or in eg. an event handler] if (!getenv("VCL_DOUBLEBUFFERING_AVOID_PAINT")) { - // The map mode of m_pWindow and/or the buffer may have changed since - // StartBufferedPaint(), set it back to what it was, otherwise unwanted - // scaling or translating may happen. - m_pWindow->SetMapMode(m_aPaintRectMapMode); - pFrameData->mpBuffer->SetMapMode(m_aPaintRectMapMode); - // Make sure that the +1 value GetSize() adds to the size is in pixels. Size aPaintRectSize; if (m_pWindow->GetMapMode().GetMapUnit() == MAP_PIXEL) -- cgit