os/graphics/graphicsdeviceinterface/screendriver/sbit/AccelSoft.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 #include <fbs.h>
    18 
    19 // Dummy implementation
    20 
    21 LOCAL_D const TGraphicsAcceleratorCaps SoftwareAcceleratorCapabilities = 
    22 	{
    23 	sizeof(TGraphicsAcceleratorCaps),	//TInt iStructureSize;	// The size of this class
    24 	1,									//TInt iVersion;		// == 1 to specify current API
    25 	{0},									//Tint iVendorUid;		// Optional ID
    26 	0,									//iDisplayModes;
    27 	0,									//iClipping;
    28 	TGraphicsAcceleratorCaps::EMaskBitmapNone,	//iMaskType;	
    29 	0,									//iTransparency;
    30 	0,									//iAlphaChannel;
    31 	0,									//iAlphaBitmap;
    32 	0,									//iPatternSizes;
    33 	0,									//iPattern;
    34 	0,									//iPolygon;
    35 	{0,0,0,0}							//iReserved[0] is used for supported orientations, iReserved[1]-iReserved[3] are reserved;
    36 	};
    37 
    38 /** 
    39 Allocates and constructs an instance of a derived class and initialises its 
    40 capabilities.
    41 
    42 @param aBitmap The bitmap for the accelerator to draw to. This may be any 
    43 type of bitmap, including a hardware bitmap.
    44 @return Pointer to the initialised graphics accelerator object.
    45 @see TGraphicsAcceleratorCaps::iDisplayModes 
    46 @leave KErrNoMemory There is no memory to allocate the graphics accelerator
    47        KErrNotSupported There is no graphics accelerator supporting the display mode given by the bitmap parameter
    48 */
    49 EXPORT_C CSoftwareGraphicsAccelerator* CSoftwareGraphicsAccelerator::NewL(CFbsBitmap* /*aBitmap*/)
    50 	{
    51 	User::Leave(KErrNotSupported);
    52 	return NULL;
    53 	}
    54 
    55 /** 
    56 Gets the generic capabilities of the accelerator, including which display modes 
    57 are supported for the bitmap passed to NewL().
    58 
    59 Generic capabilities apply to all software graphics accelerators on the device. 
    60 The function is static, so it can be used to find out the capabilities of 
    61 graphics accelerators before deciding on whether or not to create one.
    62 
    63 The CGraphicsAccelerator::Capabilities() function provides information about 
    64 the capabilities of a particular graphics accelerator.
    65 
    66 As capabilities may vary depending on the display mode of a bitmap, this method 
    67 should indicate as supported any features which are only available in some 
    68 display modes.
    69 
    70 @return Generic capabilities for software graphics accelerators. 
    71 */
    72 EXPORT_C const TGraphicsAcceleratorCaps* CSoftwareGraphicsAccelerator::GenericCapabilities()
    73 	{
    74 	return &SoftwareAcceleratorCapabilities;
    75 	}
    76