1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/graphicsresourceservices/graphicsresource/inc/sgresourceadapter.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,586 @@
1.4 +// Copyright (c) 2007-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 +/**
1.20 + @file
1.21 + @publishedPartner
1.22 + @prototype
1.23 +*/
1.24 +
1.25 +#ifndef SGRESOURCEADAPTER_H
1.26 +#define SGRESOURCEADAPTER_H
1.27 +
1.28 +#include <graphics/sgresource.h>
1.29 +#include <pixelformats.h>
1.30 +
1.31 +
1.32 +/**
1.33 +@publishedPartner
1.34 +@prototype
1.35 +@deprecated
1.36 +
1.37 +The file name of the Graphics Resource Adapter DLL.
1.38 +*/
1.39 +_LIT(KSgResourceAdapterLibraryName, "graphicsresourceadapter");
1.40 +
1.41 +
1.42 +/**
1.43 +@publishedPartner
1.44 +@prototype
1.45 +@deprecated
1.46 +
1.47 +The UID3 value in the compound identifier of the Graphics Resource Adapter DLL.
1.48 +*/
1.49 +const TUid KSgResourceAdapterLibraryUid = {0x10285A71};
1.50 +
1.51 +
1.52 +/**
1.53 +@publishedPartner
1.54 +@prototype
1.55 +@deprecated
1.56 +
1.57 +The category name of the panics raised by the Graphics Resource API.
1.58 +*/
1.59 +_LIT(KSgResourcePanicCategory, "SGRES");
1.60 +
1.61 +
1.62 +/**
1.63 +@publishedPartner
1.64 +@prototype
1.65 +@deprecated
1.66 +
1.67 +The reason numbers of the panics raised by the Graphics Resource API.
1.68 +*/
1.69 +enum TSgResourcePanicReason
1.70 + {
1.71 + /**
1.72 + SGRES 1 In debug builds, there still are open handles to graphics resources in
1.73 + a process when the process termination tasks are carried out.
1.74 + */
1.75 + ESgPanicUnclosedResources = 1,
1.76 + /**
1.77 + SGRES 2 In debug builds, an RSgDrawable handle is invalid.
1.78 + */
1.79 + ESgPanicBadDrawableHandle = 2,
1.80 + /**
1.81 + SGRES 3 In debug builds, an RSgImage handle is invalid.
1.82 + */
1.83 + ESgPanicBadImageHandle = 3,
1.84 + /**
1.85 + SGRES 4 In debug builds, an RSgImageCollection handle is invalid.
1.86 + */
1.87 + ESgPanicBadImageCollectionHandle = 4,
1.88 + /**
1.89 + SGRES 5 In debug builds, the Graphics Resource driver is not initialised for
1.90 + use in the context of the calling process.
1.91 + */
1.92 + ESgPanicNoDriver = 5
1.93 + };
1.94 +
1.95 +
1.96 +/**
1.97 +@publishedPartner
1.98 +@prototype
1.99 +@deprecated
1.100 +
1.101 +Panics the current thread specifying a panic reason from the Graphics Resource API.
1.102 +*/
1.103 +inline void Panic(TSgResourcePanicReason aReason);
1.104 +
1.105 +
1.106 +/**
1.107 +@publishedPartner
1.108 +@prototype
1.109 +@deprecated
1.110 +
1.111 +This constant consists of all the flags specifying usage of a graphics resource
1.112 +as a source of any rendering pipeline.
1.113 +*/
1.114 +const TUint32 KSgUsageAllSources = ESgUsageDirectGdiSource | ESgUsageCompositionSource
1.115 + | ESgUsageScreenSource | ESgUsageOpenGlesTexture2D | ESgUsageOpenVgImage
1.116 + | ESgUsageOpenGles2Texture2D | ESgUsageWindowGcSource;
1.117 +
1.118 +
1.119 +/**
1.120 +@publishedPartner
1.121 +@prototype
1.122 +@deprecated
1.123 +
1.124 +This constant consists of all the flags specifying usage of a graphics resource
1.125 +as a target of any rendering pipeline.
1.126 +*/
1.127 +const TUint32 KSgUsageAllTargets = ESgUsageDirectGdiTarget | ESgUsageCompositionTarget
1.128 + | ESgUsageOpenGlesTarget | ESgUsageOpenVgTarget | ESgUsageEglCopyBuffersTarget
1.129 + | ESgUsageOpenGles2Target;
1.130 +
1.131 +
1.132 +/**
1.133 +@publishedPartner
1.134 +@prototype
1.135 +@deprecated
1.136 +
1.137 +The default open mode for drawable resources.
1.138 +*/
1.139 +const TUint32 KSgDefaultOpenMode = 0;
1.140 +
1.141 +
1.142 +/**
1.143 +@publishedPartner
1.144 +@prototype
1.145 +@deprecated
1.146 +
1.147 +This interface must be implemented by all the user-side objects in the adaptation
1.148 +layer of the Graphics subsystem which are referenced by instances of any handle
1.149 +class in the Graphics Resource API. The interface between the user-side and the
1.150 +kernel-side parts of the adaptation layer is outside the scope of the specification
1.151 +of the Graphics Resource API.
1.152 +
1.153 +Each resource referenced by a handle opened in the context of a process must be
1.154 +represented by an adapter object inside the process. Both the adapter object and
1.155 +the resource itself have reference counts. The reference count for the adapter object
1.156 +equals the number of handles to the resource open in the process, while the adapter
1.157 +object counts as a single reference to the resource.
1.158 +
1.159 +Adapter objects can be shared between all the threads in a process. This has two
1.160 +consequences:
1.161 + - Adapter objects must be allocated in a multi-threaded heap owned by the Graphics
1.162 + Resource Adapter singleton.
1.163 + - Access to adapter objects must be synchronised by means of a mutual exclusion
1.164 + mechanism.
1.165 +*/
1.166 +class MSgResourceAdapter
1.167 + {
1.168 +public:
1.169 + /**
1.170 + @publishedPartner
1.171 + @prototype
1.172 + @deprecated
1.173 +
1.174 + Closes this adapter object by decrementing its reference count by one and, if the
1.175 + count becomes zero, destroying the adapter object. If the adapter object is
1.176 + destroyed then the reference count for the represented resource is decremented
1.177 + by one.
1.178 +
1.179 + @see RSgDrawable::Close()
1.180 + @see RSgImageCollection::Close()
1.181 + */
1.182 + virtual void Close() = 0;
1.183 + };
1.184 +
1.185 +
1.186 +/**
1.187 +@publishedPartner
1.188 +@prototype
1.189 +@deprecated
1.190 +
1.191 +This interface must be implemented by all the user-side objects in the adaptation
1.192 +layer of the Graphics subsystem which are referenced by instances of RSgDrawable.
1.193 +The interface between the user-side and the kernel-side parts of the adaptation
1.194 +layer is outside the scope of the specification of the Graphics Resource API.
1.195 +
1.196 +@see RSgDrawable
1.197 +*/
1.198 +class MSgDrawableAdapter: public MSgResourceAdapter
1.199 + {
1.200 +public:
1.201 + /**
1.202 + @publishedPartner
1.203 + @prototype
1.204 + @deprecated
1.205 +
1.206 + Retrieves the unique identifier of the drawable resource represented by this
1.207 + adapter object.
1.208 +
1.209 + @return The unique identifier of the drawable resource.
1.210 + @see RSgDrawable::Id()
1.211 + */
1.212 + virtual const TSgDrawableId& Id() const = 0;
1.213 + /**
1.214 + @publishedPartner
1.215 + @prototype
1.216 + @deprecated
1.217 +
1.218 + Retrieves the actual type of the drawable resource represented by this adapter
1.219 + object as a globally unique identifier.
1.220 +
1.221 + @return The actual type of the drawable resource as a globally unique identifier.
1.222 + @see RSgDrawable::DrawableType()
1.223 + */
1.224 + virtual TUid DrawableType() const = 0;
1.225 + /**
1.226 + @publishedPartner
1.227 + @prototype
1.228 + @deprecated
1.229 +
1.230 + Makes an extension interface available on the drawable resource represented by
1.231 + this adapter object.
1.232 +
1.233 + @param aInterfaceUid Globally unique identifier of the interface to be made
1.234 + available.
1.235 + @param aInterfacePtr On return, a pointer to the specified interface.
1.236 + @pre The specified interface is supported on the drawable resource.
1.237 + @post The specified interface is available until this adapter object is destroyed.
1.238 + @return KErrNone if successful.
1.239 + @return KErrExtensionNotSupported if the specified interface is not supported
1.240 + on the drawable resource.
1.241 + @return KErrNoMemory if there is not enough system memory.
1.242 + @see RSgDrawable::GetInterface()
1.243 + */
1.244 + virtual TInt GetInterface(TUid aInterfaceUid, TAny*& aInterfacePtr) = 0;
1.245 + };
1.246 +
1.247 +
1.248 +class TSgImageInfo;
1.249 +class RSgImage;
1.250 +class MSgImageAdapter;
1.251 +class MSgImageCollectionAdapter;
1.252 +
1.253 +/**
1.254 +@publishedPartner
1.255 +@prototype
1.256 +@deprecated
1.257 +
1.258 +This interface must be implemented by the Graphics Resource Adapter singleton.
1.259 +There must be a single instance of the adaptation layer class that implements
1.260 +this interface in each process using the Graphics Resource API.
1.261 +*/
1.262 +class MSgDriverAdapter
1.263 + {
1.264 +public:
1.265 + /**
1.266 + @publishedPartner
1.267 + @prototype
1.268 + @deprecated
1.269 +
1.270 + Creates a new instance of the singleton class and carries out the initialisation
1.271 + tasks needed to use the Graphics Resource API in the context of the calling
1.272 + process. This is the only function that must be exported by the Graphics Resource
1.273 + Adapter DLL, at ordinal 1.
1.274 +
1.275 + @param aPtr On return, a pointer to the new instance of the singleton class.
1.276 + @return KErrNone if successful.
1.277 + @return KErrNoMemory if there is not enough system memory.
1.278 + @see SgDriver::Open()
1.279 + */
1.280 + IMPORT_C static TInt New(MSgDriverAdapter*& aPtr);
1.281 + /**
1.282 + @publishedPartner
1.283 + @prototype
1.284 + @deprecated
1.285 +
1.286 + Deletes an instance of the singleton class and carries out the termination tasks
1.287 + needed to release the internal resources allocated for the calling process.
1.288 +
1.289 + @see SgDriver::Close()
1.290 + */
1.291 + virtual void Delete() = 0;
1.292 + /**
1.293 + @publishedPartner
1.294 + @prototype
1.295 + @deprecated
1.296 +
1.297 + Retrieves the list of image pixel formats supported on this device for a
1.298 + specified usage.
1.299 +
1.300 + @param aInfo The image attributes. aInfo.iPixelFormat is ignored.
1.301 + @param aPixelFormats A pointer to an array that on return will contain the
1.302 + supported pixel formats. If this parameter is null, then this function
1.303 + will just return the number of supported pixel formats in aCount.
1.304 + @param aCount On input, the number of elements in the array pointed to by
1.305 + aPixelFormats if not null, ignored otherwise. On return, the actual number
1.306 + of supported pixel formats. If this number is greater than the number of
1.307 + elements in the array, then the array will be filled with as many pixel
1.308 + formats as it can hold and the function will return KErrOverflow.
1.309 + @pre aInfo is valid.
1.310 + @pre If aPixelFormats is not null then aCount is greater than zero.
1.311 + @return KErrNone if successful.
1.312 + @return KErrArgument if aInfo is invalid or if aPixelFormats is not null and
1.313 + aCount is negative.
1.314 + @return KErrOverflow if the actual number of supported pixel formats is greater
1.315 + than the number of elements in the array pointed to by aPixelFormats.
1.316 + @return KErrNoMemory if there is not enough system memory.
1.317 + @see RSgImage::GetPixelFormats()
1.318 + */
1.319 + virtual TInt GetPixelFormats(const TSgImageInfo& aInfo, TUidPixelFormat* aPixelFormats, TInt& aCount) = 0;
1.320 + /**
1.321 + @publishedPartner
1.322 + @prototype
1.323 + @deprecated
1.324 +
1.325 + Creates an image with the specified attributes and, optionally, the specified
1.326 + initial contents.
1.327 +
1.328 + @param aInfo The attributes of the image to be created.
1.329 + @param aDataAddress The base address of the pixel data used to populate the
1.330 + new image. If this value is null, the initial contents of the image are
1.331 + undefined. If aInfo specifies that the new image is constant, this value
1.332 + must not be null.
1.333 + @param aDataStride The number of bytes between rows of the pixel data used to
1.334 + populate the new image.
1.335 + @param aResult On return, a pointer to the adapter object that represents the
1.336 + new image.
1.337 + @pre aInfo is supported.
1.338 + @pre aResult is null.
1.339 + @post aResult points to an adapter object that represents a newly created image
1.340 + with the specified attributes and initial contents. The initial reference
1.341 + count for the image is one.
1.342 + @return KErrNone if successful.
1.343 + @return KErrInUse if aResult was not null.
1.344 + @return KErrArgument if aInfo is invalid.
1.345 + @return KErrNoInitializationData if aInfo requests a constant image and aDataAddress
1.346 + is null.
1.347 + @return KErrTooBig if the size specified in aInfo is too large.
1.348 + @return KErrNotSupported if aInfo is not supported.
1.349 + @return KErrNoMemory if there is not enough system memory.
1.350 + @return KErrNoSpecializedMemory if there is not enough specialised graphics memory.
1.351 + @see RSgImage::Create()
1.352 + */
1.353 + virtual TInt CreateImage(const TSgImageInfo& aInfo, const TAny* aDataAddress, TInt aDataStride, MSgDrawableAdapter*& aResult) = 0;
1.354 + /**
1.355 + @publishedPartner
1.356 + @prototype
1.357 + @deprecated
1.358 +
1.359 + Creates an image with the specified attributes and initial contents copied
1.360 + from an existing image.
1.361 +
1.362 + @param aInfo The attributes of the image to be created.
1.363 + @param aImage A pointer to the adapter object that represents the existing
1.364 + image to be copied.
1.365 + @param aResult On return, a pointer to the adapter object that represents the
1.366 + new image.
1.367 + @pre aInfo is supported.
1.368 + @pre aImage is not null.
1.369 + @pre The size and the pixel format specified in aInfo must be the same as the
1.370 + size and the pixel format of the image represented by aImage.
1.371 + @pre aResult is null.
1.372 + @post aResult points to an adapter object that represents a newly created image
1.373 + with the specified attributes and initial contents. The initial reference
1.374 + count for the image is one.
1.375 + @return KErrNone if successful.
1.376 + @return KErrInUse if aResult was not null.
1.377 + @return KErrArgument if aInfo is invalid or if aImage is null.
1.378 + @return KErrNotSupported if aInfo is not supported or if the size and the pixel
1.379 + format specified in aInfo are not the same as the size and the pixel
1.380 + format of the image represented by aImage.
1.381 + @return KErrNoMemory if there is not enough system memory.
1.382 + @return KErrNoSpecializedMemory if there is not enough specialised graphics memory.
1.383 + @see RSgImage::Create()
1.384 + */
1.385 + virtual TInt CreateImage(const TSgImageInfo& aInfo, MSgImageAdapter* aImage, MSgDrawableAdapter*& aResult) = 0;
1.386 + /**
1.387 + @publishedPartner
1.388 + @prototype
1.389 + @deprecated
1.390 +
1.391 + Creates an image collection with the specified attributes.
1.392 +
1.393 + @param aInfo The image attributes of the collection to be created.
1.394 + @param aImageCount The number of images in the collection to be created.
1.395 + @param aResult On return, a pointer to the adapter object that represents the
1.396 + new image collection.
1.397 + @pre aInfo is supported and specifies mutable images.
1.398 + @pre aImageCount is greater than zero.
1.399 + @pre aResult is null.
1.400 + @post aResult points to an adapter object that represents a newly created image
1.401 + collection with the specified attributes. The initial reference count
1.402 + for the image collection is one.
1.403 + @return KErrNone if successful.
1.404 + @return KErrInUse if aResult was not null.
1.405 + @return KErrArgument if aInfo is invalid or if aImageCount is negative or zero.
1.406 + @return KErrTooBig if the size specified in aInfo is too large.
1.407 + @return KErrNotSupported if aInfo is not supported or does not specify mutable
1.408 + images.
1.409 + @return KErrNoMemory if there is not enough system memory.
1.410 + @return KErrNoSpecializedMemory if there is not enough specialised graphics memory.
1.411 + @see RSgImageCollection::Create()
1.412 + */
1.413 + virtual TInt CreateImageCollection(const TSgImageInfo& aInfo, TInt aImageCount, MSgImageCollectionAdapter*& aResult) = 0;
1.414 + /**
1.415 + @publishedPartner
1.416 + @prototype
1.417 + @deprecated
1.418 +
1.419 + Creates a set of image collections that share a single memory chunk.
1.420 +
1.421 + @param aInfos An array of aCollectionCount elements with the image attributes
1.422 + of each of the collections to be created.
1.423 + @param aImageCount The number of images in each of the collections to be created.
1.424 + @param aCollections On return, an array of pointers to the adapter objects that
1.425 + represent the new image collections.
1.426 + @param aCollectionCount The number of image collections to be created.
1.427 + @pre All the elements of aInfos are supported and specify mutable images.
1.428 + @pre aImageCount is greater than zero.
1.429 + @pre All the pointers in aCollections are null.
1.430 + @pre aCollectionCount is greater than zero.
1.431 + @post The elements of aCollections point to aCollectionCount adapter objects that
1.432 + represent newly created image collections with the specified attributes.
1.433 + The initial reference count for each of the image collections is one.
1.434 + @return KErrNone if successful.
1.435 + @return KErrInUse if any of the pointers in aCollections was not null.
1.436 + @return KErrArgument if any element of aInfos is invalid, if aImageCount is
1.437 + negative or zero, or if aCollectionCount is negative or zero.
1.438 + @return KErrTooBig if any of the sizes specified in aInfos is too large.
1.439 + @return KErrNotSupported if any element of aInfos is not supported or does not
1.440 + specify mutable images.
1.441 + @return KErrNoMemory if there is not enough system memory.
1.442 + @return KErrNoSpecializedMemory if there is not enough specialised graphics memory.
1.443 + @see RSgImageCollection::Create()
1.444 + */
1.445 + virtual TInt CreateImageCollections(const TSgImageInfo aInfos[], TInt aImageCount,
1.446 + MSgImageCollectionAdapter* aCollections[], TInt aCollectionCount) = 0;
1.447 + /**
1.448 + @publishedPartner
1.449 + @prototype
1.450 + @deprecated
1.451 +
1.452 + Opens a new handle to a drawable resource. If there are no handles to the drawable
1.453 + resource open in the calling process then this function creates a new adapter
1.454 + object that represents the drawable resource in the context of the calling process.
1.455 + Otherwise this function just increments the reference count of the existing adapter
1.456 + object that represents the drawable resource in the context of the calling process.
1.457 +
1.458 + @param aId The unique identifier of the drawable resource.
1.459 + @param aMode Flags controlling how the drawable resource is opened. The only value
1.460 + of this parameter which it is mandatory to support is KSgDefaultOpenMode.
1.461 + Extra opening options may be defined by an implementation of the Graphics
1.462 + Resource API and made available through additional functions.
1.463 + @param aHandleType The type of the handle which is to store the reference to
1.464 + the specified drawable resource as a globally unique identifier.
1.465 + @param aResult On return, a pointer to the adapter object that represents the
1.466 + specified drawable resource.
1.467 + @pre aId identifies an existing drawable resource.
1.468 + @pre All of the requested opening options in aMode are supported.
1.469 + @pre aHandleType specifies an instance of RSgDrawable or any other handle type
1.470 + that is compatible with the actual type of the specified drawable resource.
1.471 + @pre aResult is null.
1.472 + @post aResult points to either a newly created or an existing adapter object
1.473 + that represents the drawable resource specified by its unique identifier.
1.474 + If a new adapter object is created then its initial reference count is
1.475 + one and the reference count for the drawable resource itself is incremented
1.476 + by one. Otherwise only the reference count for the adapter object is
1.477 + incremented by one.
1.478 + @return KErrNone if successful.
1.479 + @return KErrInUse if aResult was not null.
1.480 + @return KErrArgument if aId is the null drawable resource identifier.
1.481 + @return KErrNotFound if aId cannot be found to refer to an existing drawable
1.482 + resource.
1.483 + @return KErrPermissionDenied if this process is not permitted to access the
1.484 + drawable resource specified by aId.
1.485 + @return KErrNotSupported if any of the requested opening options in aMode is
1.486 + not supported or if aHandleType is not compatible with the actual type
1.487 + of the drawable resource specified by aId.
1.488 + @return KErrNoMemory if there is not enough system memory.
1.489 + @see RSgDrawable::Open()
1.490 + */
1.491 + virtual TInt OpenDrawable(const TSgDrawableId& aId, TUint32 aMode, TUid aHandleType, MSgDrawableAdapter*& aResult) = 0;
1.492 + /**
1.493 + @publishedPartner
1.494 + @prototype
1.495 + @deprecated
1.496 +
1.497 + Tests whether aDrawable references an existing adapter object representing a
1.498 + drawable resource. This function is called in debug builds to detect invalid
1.499 + RSgDrawable handles.
1.500 +
1.501 + @return ETrue if aDrawable is a valid reference to an adapter object representing
1.502 + a drawable resource, EFalse otherwise.
1.503 + */
1.504 + virtual TBool CheckDrawable(const MSgResourceAdapter& aDrawable) const = 0;
1.505 + /**
1.506 + @publishedPartner
1.507 + @prototype
1.508 + @deprecated
1.509 +
1.510 + Tests whether aImage references an existing adapter object representing an image.
1.511 + This function is called in debug builds to detect invalid RSgImage handles.
1.512 +
1.513 + @return ETrue if aImage is a valid reference to an adapter object representing
1.514 + an image, EFalse otherwise.
1.515 + */
1.516 + virtual TBool CheckImage(const MSgResourceAdapter& aImage) const = 0;
1.517 + /**
1.518 + @publishedPartner
1.519 + @prototype
1.520 + @deprecated
1.521 +
1.522 + Tests whether aImageCollection references an existing adapter object representing
1.523 + an image collection. This function is called in debug builds to detect invalid
1.524 + RSgImageCollection handles.
1.525 +
1.526 + @return ETrue if aImageCollection is a valid reference to an adapter object
1.527 + representing an image collection, EFalse otherwise.
1.528 + */
1.529 + virtual TBool CheckImageCollection(const MSgResourceAdapter& aImageCollection) const = 0;
1.530 + /**
1.531 + @publishedPartner
1.532 + @deprecated
1.533 + @test
1.534 +
1.535 + Retrieves the number of handles to graphics resources open in the calling process.
1.536 +
1.537 + @return The number of handles to graphics resources open in the calling process.
1.538 + */
1.539 + virtual TInt ResourceCount() const = 0;
1.540 + /**
1.541 + @publishedPartner
1.542 + @deprecated
1.543 + @test
1.544 +
1.545 + Marks the start of cell checking on the heap for adapter objects. Calls to this
1.546 + function can be nested but each call must be matched by a corresponding call to
1.547 + AllocMarkEnd().
1.548 +
1.549 + @see RAllocator::__DbgMarkStart()
1.550 + */
1.551 + virtual void AllocMarkStart() = 0;
1.552 + /**
1.553 + @publishedPartner
1.554 + @deprecated
1.555 + @test
1.556 +
1.557 + Marks the end of cell checking at the current nesting level on the heap for
1.558 + adapter objects. Each call to this function must match an earlier call to
1.559 + AllocMarkStart().
1.560 +
1.561 + This function checks that the number of cells allocated in the heap for adapter
1.562 + objects, at the current nesting level, is aCount. If the check fails then an
1.563 + SGALLOC:nnnnnnnn panic is raised, where nnnnnnnn is the hexadecimal address
1.564 + of the first orphaned cell.
1.565 +
1.566 + @param aCount The number of allocated heap cells expected.
1.567 + @see RAllocator::__DbgMarkEnd()
1.568 + */
1.569 + virtual void AllocMarkEnd(TInt aCount) = 0;
1.570 + /**
1.571 + @publishedPartner
1.572 + @deprecated
1.573 + @test
1.574 +
1.575 + Sets the type and rate of simulated allocation failure on the heap for adapter
1.576 + objects.
1.577 +
1.578 + @param aType The type of allocation failure requested.
1.579 + @param aRate The rate of allocation failure requested.
1.580 + @see RAllocator::__DbgSetAllocFail()
1.581 + */
1.582 + virtual void SetAllocFail(RAllocator::TAllocFail aType, TInt aRate) = 0;
1.583 + };
1.584 +
1.585 +
1.586 +#include <graphics/sgresourceadapter.inl>
1.587 +
1.588 +
1.589 +#endif // SGRESOURCEADAPTER_H