LCOV - code coverage report
Current view: top level - canvas/source/tools - surfaceproxy.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 1 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 2 0.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_CANVAS_SOURCE_TOOLS_SURFACEPROXY_HXX
      21             : #define INCLUDED_CANVAS_SOURCE_TOOLS_SURFACEPROXY_HXX
      22             : 
      23             : #include <canvas/rendering/isurfaceproxy.hxx>
      24             : #include <canvas/rendering/icolorbuffer.hxx>
      25             : 
      26             : #include "pagemanager.hxx"
      27             : #include "surface.hxx"
      28             : 
      29             : namespace canvas
      30             : {
      31             : 
      32             : 
      33             :     // SurfaceProxy
      34             : 
      35             : 
      36             :     /** Definition of the surface proxy class.
      37             : 
      38             :         Surface proxies are the connection between *one* source image
      39             :         and *one or more* hardware surfaces (or textures).  in a
      40             :         logical structure surface proxies represent solely this
      41             :         dependeny plus some simple cache management.
      42             :     */
      43           0 :     class SurfaceProxy : public ISurfaceProxy
      44             :     {
      45             :     public:
      46             : 
      47             :         SurfaceProxy( const canvas::IColorBufferSharedPtr& pBuffer,
      48             :                       const PageManagerSharedPtr &pPageManager );
      49             : 
      50             :         // ISurfaceProxy interface
      51             :         virtual void setColorBufferDirty() SAL_OVERRIDE;
      52             : 
      53             :         /** Render the surface content to screen.
      54             : 
      55             :             @param fAlpha
      56             :             Overall alpha for content
      57             : 
      58             :             @param rPos
      59             :             Output position
      60             : 
      61             :             @param rTransform
      62             :             Output transformation (does not affect output position)
      63             :         */
      64             :         virtual bool draw( double                         fAlpha,
      65             :                            const ::basegfx::B2DPoint&     rPos,
      66             :                            const ::basegfx::B2DHomMatrix& rTransform ) SAL_OVERRIDE;
      67             : 
      68             :         /** Render the surface content to screen.
      69             : 
      70             :             @param fAlpha
      71             :             Overall alpha for content
      72             : 
      73             :             @param rPos
      74             :             Output position
      75             : 
      76             :             @param rArea
      77             :             Subset of the surface to render. Coordinate system are
      78             :             surface area pixel, given area will be clipped to the
      79             :             surface bounds.
      80             : 
      81             :             @param rTransform
      82             :             Output transformation (does not affect output position)
      83             :         */
      84             :         virtual bool draw( double                         fAlpha,
      85             :                            const ::basegfx::B2DPoint&     rPos,
      86             :                            const ::basegfx::B2DRange&     rArea,
      87             :                            const ::basegfx::B2DHomMatrix& rTransform ) SAL_OVERRIDE;
      88             : 
      89             :         /** Render the surface content to screen.
      90             : 
      91             :             @param fAlpha
      92             :             Overall alpha for content
      93             : 
      94             :             @param rPos
      95             :             Output position
      96             : 
      97             :             @param rClipPoly
      98             :             Clip polygon for the surface. The clip polygon is also
      99             :             subject to the output transformation.
     100             : 
     101             :             @param rTransform
     102             :             Output transformation (does not affect output position)
     103             :         */
     104             :         virtual bool draw( double                           fAlpha,
     105             :                            const ::basegfx::B2DPoint&       rPos,
     106             :                            const ::basegfx::B2DPolyPolygon& rClipPoly,
     107             :                            const ::basegfx::B2DHomMatrix&   rTransform ) SAL_OVERRIDE;
     108             : 
     109             :     private:
     110             :         PageManagerSharedPtr          mpPageManager;
     111             : 
     112             :         // the pagemanager will distribute the image
     113             :         // to one or more surfaces, this is why we
     114             :         // need a list here.
     115             :         std::vector<SurfaceSharedPtr> maSurfaceList;
     116             : 
     117             :         // pointer to the source of image data
     118             :         // which always is stored in system memory,
     119             :         // 32bit rgba and can have any size.
     120             :         canvas::IColorBufferSharedPtr mpBuffer;
     121             :     };
     122             : 
     123             :     typedef ::boost::shared_ptr< SurfaceProxy > SurfaceProxySharedPtr;
     124             : }
     125             : 
     126             : #endif
     127             : 
     128             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11