sl@0
|
1 |
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// ACCELSOFT.CPP
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
#include <graphicsaccelerator.h>
|
sl@0
|
19 |
#include <fbs.h>
|
sl@0
|
20 |
|
sl@0
|
21 |
/**
|
sl@0
|
22 |
A wrapper around the screendriver implementation of a factory for creating 2D
|
sl@0
|
23 |
graphics accelerator objects whose graphics operations are implemented in software.
|
sl@0
|
24 |
|
sl@0
|
25 |
Do not use, link against scdv.lib, here for BC.
|
sl@0
|
26 |
|
sl@0
|
27 |
@internalComponent
|
sl@0
|
28 |
@see CSoftwareGraphicsAccelerator
|
sl@0
|
29 |
*/
|
sl@0
|
30 |
class CSoftwareGraphicsAcceleratorBC : public CGraphicsAccelerator
|
sl@0
|
31 |
{
|
sl@0
|
32 |
public:
|
sl@0
|
33 |
// Create a new CSoftwareGraphicsAccelerator for use with a given bitmap
|
sl@0
|
34 |
IMPORT_C static CSoftwareGraphicsAccelerator* NewL(CFbsBitmap* aBitmap);
|
sl@0
|
35 |
|
sl@0
|
36 |
// Get the non-bitmap-specific capabilities of the hardware accelerator.
|
sl@0
|
37 |
IMPORT_C static const TGraphicsAcceleratorCaps* GenericCapabilities();
|
sl@0
|
38 |
public:
|
sl@0
|
39 |
// From CGraphicsAccelerator
|
sl@0
|
40 |
virtual const TGraphicsAcceleratorCaps* Capabilities() = 0;
|
sl@0
|
41 |
virtual TInt Operation(const TGraphicsOperation& aOperation) = 0;
|
sl@0
|
42 |
virtual TInt Operation(const TGraphicsOperation& aOperation,TInt aNumClipRects,TRect* aClipRects) = 0;
|
sl@0
|
43 |
virtual TInt Operation(TDes8& aBuffer) = 0;
|
sl@0
|
44 |
virtual TInt Operation(TDes8& aBuffer,TInt aNumClipRects,TRect* aClipRects) = 0;
|
sl@0
|
45 |
// From CGraphicsAccelerator
|
sl@0
|
46 |
virtual void Reserved_1() = 0;
|
sl@0
|
47 |
virtual void Reserved_2() = 0;
|
sl@0
|
48 |
virtual void Reserved_3() = 0;
|
sl@0
|
49 |
virtual void Reserved_4() = 0;
|
sl@0
|
50 |
};
|
sl@0
|
51 |
|
sl@0
|
52 |
/**
|
sl@0
|
53 |
Allocates and constructs an instance of a derived class and initialises its
|
sl@0
|
54 |
capabilities.
|
sl@0
|
55 |
|
sl@0
|
56 |
Do not use, link against scdv.lib, here for BC.
|
sl@0
|
57 |
|
sl@0
|
58 |
@param aBitmap The bitmap for the accelerator to draw to. This may be any
|
sl@0
|
59 |
type of bitmap, including a hardware bitmap.
|
sl@0
|
60 |
@return Pointer to the initialised graphics accelerator object.
|
sl@0
|
61 |
@see CSoftwareGraphicsAccelerator::NewL
|
sl@0
|
62 |
*/
|
sl@0
|
63 |
EXPORT_C CSoftwareGraphicsAccelerator* CSoftwareGraphicsAcceleratorBC::NewL(CFbsBitmap* aBitmap)
|
sl@0
|
64 |
{
|
sl@0
|
65 |
return CSoftwareGraphicsAccelerator::NewL(aBitmap);
|
sl@0
|
66 |
}
|
sl@0
|
67 |
|
sl@0
|
68 |
/**
|
sl@0
|
69 |
Gets the generic capabilities of the accelerator, including which display modes
|
sl@0
|
70 |
are supported for the bitmap passed to NewL().
|
sl@0
|
71 |
|
sl@0
|
72 |
Do not use, link against scdv.lib, here for BC.
|
sl@0
|
73 |
|
sl@0
|
74 |
@return Generic capabilities for software graphics accelerators.
|
sl@0
|
75 |
@see CSoftwareGraphicsAccelerator::GenericCapabilities
|
sl@0
|
76 |
*/
|
sl@0
|
77 |
EXPORT_C const TGraphicsAcceleratorCaps* CSoftwareGraphicsAcceleratorBC::GenericCapabilities()
|
sl@0
|
78 |
{
|
sl@0
|
79 |
return CSoftwareGraphicsAccelerator::GenericCapabilities();
|
sl@0
|
80 |
}
|
sl@0
|
81 |
|