1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/graphicsdeviceinterface/screendriver/smomap/accelhard.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,63 @@
1.4 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#include "GraphicsAccelerator.h"
1.20 +
1.21 +LOCAL_D const TGraphicsAcceleratorCaps HardwareAcceleratorCapabilities =
1.22 +{
1.23 + sizeof(TGraphicsAcceleratorCaps), //TInt iStructureSize; // The size of this class
1.24 + 1, //TInt iVersion; // == 1 to specify current API
1.25 + {0} //Tint iVendorUid; // Optional ID
1.26 + // Default values of zero...
1.27 +};
1.28 +
1.29 +EXPORT_C CHardwareGraphicsAccelerator* CHardwareGraphicsAccelerator::NewL(RHardwareBitmap /*aBitmap*/)
1.30 +/**
1.31 +Allocates and constructs an instance of a derived class and initialises its
1.32 +capabilities.
1.33 +
1.34 +@param aBitmap The hardware bitmap for the accelerator to draw to.
1.35 +@return Pointer to the initialised graphics accelerator object.
1.36 +@see TGraphicsAcceleratorCaps::iDisplayModes
1.37 +@leave KErrNoMemory There is no memory to allocate the graphics accelerator
1.38 + KErrNotSupported There is no graphics accelerator supporting the display mode given by the bitmap parameter
1.39 +*/
1.40 + {
1.41 + User::Leave(KErrNotSupported) ;
1.42 + return NULL ;
1.43 + }
1.44 +
1.45 +EXPORT_C const TGraphicsAcceleratorCaps* CHardwareGraphicsAccelerator::GenericCapabilities()
1.46 +/**
1.47 +Gets the generic capabilities of the accelerator, including which display modes
1.48 +are supported for the bitmap passed to NewL().
1.49 +
1.50 +Generic capabilities apply to all hardware graphics accelerators on the device.
1.51 +The function is static, so it can be used to find out the capabilities of
1.52 +graphics accelerators before deciding on whether or not to create one.
1.53 +
1.54 +The CGraphicsAccelerator::Capabilities() function provides information about
1.55 +the capabilities of a particular graphics accelerator.
1.56 +
1.57 +As capabilities may vary depending on the display mode of a bitmap, this method
1.58 +should indicate as supported any features which are only available in some
1.59 +display modes.
1.60 +
1.61 +@return Generic capabilities for hardware graphics accelerators.
1.62 +*/
1.63 + {
1.64 + return &HardwareAcceleratorCapabilities ;
1.65 + }
1.66 +