os/graphics/graphicsdeviceinterface/screendriver/smint/AccelHard.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2001-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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #include "GraphicsAccelerator.h"
    17 
    18 LOCAL_D const TGraphicsAcceleratorCaps HardwareAcceleratorCapabilities =
    19 	{
    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...
    24 	};
    25 
    26 EXPORT_C CHardwareGraphicsAccelerator* CHardwareGraphicsAccelerator::NewL(RHardwareBitmap /*aBitmap*/)
    27 /** 
    28 Allocates and constructs an instance of a derived class and initialises its 
    29 capabilities.
    30 
    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 */
    35 	{
    36 	User::Leave(KErrNotSupported);
    37 	return NULL;
    38 	}
    39 
    40 EXPORT_C const TGraphicsAcceleratorCaps* CHardwareGraphicsAccelerator::GenericCapabilities()
    41 /** 
    42 Gets the generic capabilities of the accelerator, including which display modes 
    43 are supported for the bitmap passed to NewL().
    44 
    45 Generic capabilities apply to all hardware graphics accelerators on the device. 
    46 The function is static, so it can be used to find out the capabilities of 
    47 graphics accelerators before deciding on whether or not to create one.
    48 
    49 The CGraphicsAccelerator::Capabilities() function provides information about 
    50 the capabilities of a particular graphics accelerator.
    51 
    52 As capabilities may vary depending on the display mode of a bitmap, this method 
    53 should indicate as supported any features which are only available in some 
    54 display modes.
    55 
    56 @return Generic capabilities for hardware graphics accelerators. 
    57 */
    58 	{
    59 	return &HardwareAcceleratorCapabilities;
    60 	}
    61