os/graphics/graphicsdeviceinterface/screendriver/smint/AccelHard.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2001-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
*/
sl@0
    35
	{
sl@0
    36
	User::Leave(KErrNotSupported);
sl@0
    37
	return NULL;
sl@0
    38
	}
sl@0
    39
sl@0
    40
EXPORT_C const TGraphicsAcceleratorCaps* CHardwareGraphicsAccelerator::GenericCapabilities()
sl@0
    41
/** 
sl@0
    42
Gets the generic capabilities of the accelerator, including which display modes 
sl@0
    43
are supported for the bitmap passed to NewL().
sl@0
    44
sl@0
    45
Generic capabilities apply to all hardware graphics accelerators on the device. 
sl@0
    46
The function is static, so it can be used to find out the capabilities of 
sl@0
    47
graphics accelerators before deciding on whether or not to create one.
sl@0
    48
sl@0
    49
The CGraphicsAccelerator::Capabilities() function provides information about 
sl@0
    50
the capabilities of a particular graphics accelerator.
sl@0
    51
sl@0
    52
As capabilities may vary depending on the display mode of a bitmap, this method 
sl@0
    53
should indicate as supported any features which are only available in some 
sl@0
    54
display modes.
sl@0
    55
sl@0
    56
@return Generic capabilities for hardware graphics accelerators. 
sl@0
    57
*/
sl@0
    58
	{
sl@0
    59
	return &HardwareAcceleratorCapabilities;
sl@0
    60
	}
sl@0
    61