LCOV - code coverage report
Current view: top level - canvas/source/tools - surfaceproxymanager.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 8 0.0 %
Date: 2014-04-14 Functions: 0 5 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             : 
      21             : #include <canvas/rendering/isurfaceproxymanager.hxx>
      22             : #include <canvas/rendering/isurfaceproxy.hxx>
      23             : #include "surfaceproxy.hxx"
      24             : 
      25             : namespace canvas
      26             : {
      27             : 
      28             : 
      29             :     // SurfaceProxyManager
      30             : 
      31             : 
      32           0 :     class SurfaceProxyManager : public ISurfaceProxyManager
      33             :     {
      34             :     public:
      35             : 
      36           0 :         SurfaceProxyManager( const IRenderModuleSharedPtr pRenderModule ) :
      37           0 :             mpPageManager( new PageManager(pRenderModule) )
      38             :         {
      39           0 :         }
      40             : 
      41             :         /** the whole idea is build around the concept that you create
      42             :             some arbitrary buffer which contains the image data and
      43             :             tell the texture manager about it.  from there on you can
      44             :             draw this image using any kind of graphics api you want.
      45             :             in the technical sense we allocate some space in local
      46             :             videomemory or AGP memory which will be filled on demand,
      47             :             which means if there exists any rendering operation that
      48             :             needs to read from this memory location.  this method
      49             :             creates a logical hardware surface object which uses the
      50             :             given color buffer as the image source.  internally this
      51             :             texture may be distributed to several real hardware
      52             :             surfaces.
      53             :         */
      54           0 :         virtual ISurfaceProxySharedPtr createSurfaceProxy( const IColorBufferSharedPtr& pBuffer ) const SAL_OVERRIDE
      55             :         {
      56             :             // not much to do for now, simply allocate a new surface
      57             :             // proxy from our internal pool and initialize this thing
      58             :             // properly. we *don't* create a hardware surface for now.
      59           0 :             return SurfaceProxySharedPtr(new SurfaceProxy(pBuffer,mpPageManager));
      60             :         }
      61             : 
      62             :     private:
      63             :         PageManagerSharedPtr mpPageManager;
      64             :     };
      65             : 
      66             : 
      67             :     // createSurfaceProxyManager
      68             : 
      69             : 
      70           0 :     ISurfaceProxyManagerSharedPtr createSurfaceProxyManager( const IRenderModuleSharedPtr& rRenderModule )
      71             :     {
      72             :         return ISurfaceProxyManagerSharedPtr(
      73             :             new SurfaceProxyManager(
      74           0 :                 rRenderModule));
      75             :     }
      76             : }
      77             : 
      78             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10