Move setting of LD_LIBRARY_PATH closer to invocation of cppunittester
[LibreOffice.git] / canvas / source / tools / surfaceproxy.hxx
blob72841d754e0a030243ec25797ae7d9876afa47fa
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
22 #include <rendering/isurfaceproxy.hxx>
23 #include <rendering/icolorbuffer.hxx>
25 #include "pagemanager.hxx"
26 #include "surface.hxx"
28 namespace canvas
30 /** Definition of the surface proxy class.
32 Surface proxies are the connection between *one* source image
33 and *one or more* hardware surfaces (or textures). in a
34 logical structure surface proxies represent solely this
35 dependency plus some simple cache management.
37 class SurfaceProxy : public ISurfaceProxy
39 public:
41 SurfaceProxy( std::shared_ptr<canvas::IColorBuffer> xBuffer,
42 PageManagerSharedPtr xPageManager );
44 // ISurfaceProxy interface
45 virtual void setColorBufferDirty() override;
47 /** Render the surface content to screen.
49 @param fAlpha
50 Overall alpha for content
52 @param rPos
53 Output position
55 @param rTransform
56 Output transformation (does not affect output position)
58 virtual bool draw( double fAlpha,
59 const ::basegfx::B2DPoint& rPos,
60 const ::basegfx::B2DHomMatrix& rTransform ) override;
62 /** Render the surface content to screen.
64 @param fAlpha
65 Overall alpha for content
67 @param rPos
68 Output position
70 @param rArea
71 Subset of the surface to render. Coordinate system are
72 surface area pixel, given area will be clipped to the
73 surface bounds.
75 @param rTransform
76 Output transformation (does not affect output position)
78 virtual bool draw( double fAlpha,
79 const ::basegfx::B2DPoint& rPos,
80 const ::basegfx::B2DRange& rArea,
81 const ::basegfx::B2DHomMatrix& rTransform ) override;
83 /** Render the surface content to screen.
85 @param fAlpha
86 Overall alpha for content
88 @param rPos
89 Output position
91 @param rClipPoly
92 Clip polygon for the surface. The clip polygon is also
93 subject to the output transformation.
95 @param rTransform
96 Output transformation (does not affect output position)
98 virtual bool draw( double fAlpha,
99 const ::basegfx::B2DPoint& rPos,
100 const ::basegfx::B2DPolyPolygon& rClipPoly,
101 const ::basegfx::B2DHomMatrix& rTransform ) override;
103 private:
104 PageManagerSharedPtr mpPageManager;
106 // the pagemanager will distribute the image
107 // to one or more surfaces, this is why we
108 // need a list here.
109 std::vector<SurfaceSharedPtr> maSurfaceList;
111 // pointer to the source of image data
112 // which always is stored in system memory,
113 // 32bit rgba and can have any size.
114 std::shared_ptr<canvas::IColorBuffer> mpBuffer;
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */