Update contrib.
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #include "GraphicsAccelerator.h"
18 LOCAL_D const TGraphicsAcceleratorCaps HardwareAcceleratorCapabilities =
20 sizeof(TGraphicsAcceleratorCaps), //TInt iStructureSize; // The size of this class
21 1, //TInt iVersion; // == 1 to specify current API
22 {0} //Tint iVendorUid; // Optional ID
23 // Default values of zero...
26 EXPORT_C CHardwareGraphicsAccelerator* CHardwareGraphicsAccelerator::NewL(RHardwareBitmap /*aBitmap*/)
28 Allocates and constructs an instance of a derived class and initialises its
31 @param aBitmap The hardware bitmap for the accelerator to draw to.
32 @return Pointer to the initialised graphics accelerator object.
33 @see TGraphicsAcceleratorCaps::iDisplayModes
34 @leave KErrNoMemory There is no memory to allocate the graphics accelerator
35 KErrNotSupported There is no graphics accelerator supporting the display mode given by the bitmap parameter
38 User::Leave(KErrNotSupported) ;
42 EXPORT_C const TGraphicsAcceleratorCaps* CHardwareGraphicsAccelerator::GenericCapabilities()
44 Gets the generic capabilities of the accelerator, including which display modes
45 are supported for the bitmap passed to NewL().
47 Generic capabilities apply to all hardware graphics accelerators on the device.
48 The function is static, so it can be used to find out the capabilities of
49 graphics accelerators before deciding on whether or not to create one.
51 The CGraphicsAccelerator::Capabilities() function provides information about
52 the capabilities of a particular graphics accelerator.
54 As capabilities may vary depending on the display mode of a bitmap, this method
55 should indicate as supported any features which are only available in some
58 @return Generic capabilities for hardware graphics accelerators.
61 return &HardwareAcceleratorCapabilities ;