Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef INCLUDED_CANVAS_ISURFACEPROXYMANAGER_HXX
30 : : #define INCLUDED_CANVAS_ISURFACEPROXYMANAGER_HXX
31 : :
32 : : #include <canvas/rendering/irendermodule.hxx>
33 : : #include <canvas/rendering/icolorbuffer.hxx>
34 : :
35 : : #include <boost/shared_ptr.hpp>
36 : :
37 : : #include <canvas/canvastoolsdllapi.h>
38 : :
39 : : namespace canvas
40 : : {
41 : : struct ISurfaceProxy;
42 : :
43 : : /** Manager interface, which handles surface proxy objects.
44 : :
45 : : Typically, each canvas instantiation has one
46 : : SurfaceProxyManager object, to handle their surfaces. Surfaces
47 : : itself are opaque objects, which encapsulate a framebuffer to
48 : : render upon, plus an optional (possibly accelerated) texture.
49 : : */
50 : 0 : struct ISurfaceProxyManager
51 : : {
52 [ # # ]: 0 : virtual ~ISurfaceProxyManager() {}
53 : :
54 : : /** Create a surface proxy for a color buffer.
55 : :
56 : : The whole idea is build around the concept that you create
57 : : some arbitrary buffer which contains the image data and
58 : : tell the texture manager about it. From there on you can
59 : : draw into this image using any kind of graphics api you
60 : : want. In the technical sense we allocate some space in
61 : : local videomemory or AGP memory which will be filled on
62 : : demand, which means if there exists any rendering
63 : : operation that needs to read from this memory location.
64 : : This method creates a logical hardware surface object
65 : : which uses the given color buffer as the image source.
66 : : Internally this texture may even be distributed to several
67 : : real hardware surfaces.
68 : : */
69 : : virtual ::boost::shared_ptr< ISurfaceProxy > createSurfaceProxy(
70 : : const IColorBufferSharedPtr& pBuffer ) const = 0;
71 : : };
72 : :
73 : : typedef ::boost::shared_ptr< ISurfaceProxyManager > ISurfaceProxyManagerSharedPtr;
74 : :
75 : :
76 : : /** Create a surface proxy for the given render module.
77 : : */
78 : : CANVASTOOLS_DLLPUBLIC ISurfaceProxyManagerSharedPtr createSurfaceProxyManager( const IRenderModuleSharedPtr& rRenderModule );
79 : : }
80 : :
81 : : #endif /* INCLUDED_CANVAS_ISURFACEPROXYMANAGER_HXX */
82 : :
83 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|