os/graphics/graphicsdeviceinterface/screendriver/smomap/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.
sl@0
     1
// Copyright (c) 2003-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
//
sl@0
    15
sl@0
    16
#include "GraphicsAccelerator.h"
sl@0
    17
sl@0
    18
LOCAL_D const TGraphicsAcceleratorCaps HardwareAcceleratorCapabilities =
sl@0
    19
{
sl@0
    20
    sizeof(TGraphicsAcceleratorCaps),	//TInt iStructureSize;	// The size of this class
sl@0
    21
    1,									//TInt iVersion;		// == 1 to specify current API
sl@0
    22
    {0}									//Tint iVendorUid;		// Optional ID
sl@0
    23
    // Default values of zero...
sl@0
    24
};
sl@0
    25
sl@0
    26
EXPORT_C CHardwareGraphicsAccelerator* CHardwareGraphicsAccelerator::NewL(RHardwareBitmap /*aBitmap*/)
sl@0
    27
/** 
sl@0
    28
Allocates and constructs an instance of a derived class and initialises its 
sl@0
    29
capabilities.
sl@0
    30
sl@0
    31
@param aBitmap The hardware bitmap for the accelerator to draw to.
sl@0
    32
@return Pointer to the initialised graphics accelerator object.
sl@0
    33
@see TGraphicsAcceleratorCaps::iDisplayModes 
sl@0
    34
@leave KErrNoMemory There is no memory to allocate the graphics accelerator
sl@0
    35
       KErrNotSupported There is no graphics accelerator supporting the display mode given by the bitmap parameter
sl@0
    36
*/
sl@0
    37
	{
sl@0
    38
    User::Leave(KErrNotSupported) ;
sl@0
    39
    return NULL ;
sl@0
    40
	}
sl@0
    41
sl@0
    42
EXPORT_C const TGraphicsAcceleratorCaps* CHardwareGraphicsAccelerator::GenericCapabilities()
sl@0
    43
/** 
sl@0
    44
Gets the generic capabilities of the accelerator, including which display modes 
sl@0
    45
are supported for the bitmap passed to NewL().
sl@0
    46
sl@0
    47
Generic capabilities apply to all hardware graphics accelerators on the device. 
sl@0
    48
The function is static, so it can be used to find out the capabilities of 
sl@0
    49
graphics accelerators before deciding on whether or not to create one.
sl@0
    50
sl@0
    51
The CGraphicsAccelerator::Capabilities() function provides information about 
sl@0
    52
the capabilities of a particular graphics accelerator.
sl@0
    53
sl@0
    54
As capabilities may vary depending on the display mode of a bitmap, this method 
sl@0
    55
should indicate as supported any features which are only available in some 
sl@0
    56
display modes.
sl@0
    57
sl@0
    58
@return Generic capabilities for hardware graphics accelerators. 
sl@0
    59
*/
sl@0
    60
	{
sl@0
    61
    return &HardwareAcceleratorCapabilities ;
sl@0
    62
	}
sl@0
    63