LCOV - code coverage report
Current view: top level - svx/inc/sdr/overlay - overlaymanagerbuffered.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 1 1 100.0 %
Date: 2014-11-03 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYMANAGERBUFFERED_HXX
      21             : #define INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYMANAGERBUFFERED_HXX
      22             : 
      23             : #include <svx/sdr/overlay/overlaymanager.hxx>
      24             : #include <basegfx/range/b2irange.hxx>
      25             : #include <vcl/virdev.hxx>
      26             : 
      27             : 
      28             : 
      29             : namespace sdr
      30             : {
      31             :     namespace overlay
      32             :     {
      33             :         class OverlayManagerBuffered : public OverlayManager
      34             :         {
      35             :         protected:
      36             :             // The VirtualDevice for draw window content buffering, this
      37             :             // is the view content without overlay
      38             :             VirtualDevice                           maBufferDevice;
      39             : 
      40             :             // #i73602# The VirtualDevice for OverlayPaint buffering. This
      41             :             // is an extra device to avoid flickering of overlay paints
      42             :             VirtualDevice                           maOutputBufferDevice;
      43             : 
      44             :             // Timer for buffering
      45             :             Timer                                   maBufferTimer;
      46             : 
      47             :             // Range for buffering (in pixel to be independent from mapMode)
      48             :             basegfx::B2IRange                       maBufferRememberedRangePixel;
      49             : 
      50             :             // bitfield
      51             :             // Flag to decide if PreRendering shall be used for overlay refreshes.
      52             :             // Default is false.
      53             :             bool                                    mbRefreshWithPreRendering : 1;
      54             : 
      55             :             // link for timer
      56             :             DECL_LINK(ImpBufferTimerHandler, AutoTimer*);
      57             : 
      58             :             // Internal methods for buffering
      59             :             void ImpPrepareBufferDevice();
      60             :             void ImpRestoreBackground() const ;
      61             :             void ImpRestoreBackground(const vcl::Region& rRegionPixel) const;
      62             :             void ImpSaveBackground(const vcl::Region& rRegion, OutputDevice* pPreRenderDevice = 0L);
      63             : 
      64             :             OverlayManagerBuffered(
      65             :                 OutputDevice& rOutputDevice,
      66             :                 bool bRefreshWithPreRendering = false);
      67             :             virtual ~OverlayManagerBuffered();
      68             : 
      69             :         public:
      70             :             static rtl::Reference<OverlayManager> create(OutputDevice& rOutputDevice,
      71             :                 bool bRefreshWithPreRendering = false);
      72             : 
      73             :             // complete redraw
      74             :             virtual void completeRedraw(const vcl::Region& rRegion, OutputDevice* pPreRenderDevice = 0L) const SAL_OVERRIDE;
      75             : 
      76             :             // flush. Do buffered updates.
      77             :             virtual void flush() SAL_OVERRIDE;
      78             : 
      79             :             // #i68597# part of content gets copied, react on it
      80             :             virtual void copyArea(const Point& rDestPt, const Point& rSrcPt, const Size& rSrcSize) SAL_OVERRIDE;
      81             : 
      82             :             // restore part of background. Implemented form buffered versions only.
      83             :             virtual void restoreBackground(const vcl::Region& rRegion) const SAL_OVERRIDE;
      84             : 
      85             :             // invalidate the given range at local OutputDevice
      86             :             virtual void invalidateRange(const basegfx::B2DRange& rRange) SAL_OVERRIDE;
      87             : 
      88             :             // access to RefreshWithPreRendering Flag
      89        1013 :             bool DoRefreshWithPreRendering() const { return mbRefreshWithPreRendering; }
      90             :         };
      91             :     } // end of namespace overlay
      92             : } // end of namespace sdr
      93             : 
      94             : 
      95             : 
      96             : #endif // INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYMANAGERBUFFERED_HXX
      97             : 
      98             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10