Symbian3/PDK/Source/GUID-59C9EF92-8207-5FA5-AA20-0DB00C211BF1.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 16:16:55 +0100
changeset 6 43e37759235e
parent 5 f345bda72bc4
child 14 578be2adaf3e
permissions -rw-r--r--
Week 12 contribution of example code"

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-59C9EF92-8207-5FA5-AA20-0DB00C211BF1" xml:lang="en"><title>Graphics
Resource Services Collection Overview</title><shortdesc>This topic provides an introduction to the Graphics Resource Services
collection. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p><b>Target audience</b>: Device creators. </p>
<note type="note">The Graphics Resource component is deprecated in Symbian^3
and will be removed in Symbian^4 (S^4). However, a new Graphics Resource Interface
component is planned for S^4. This new component will provide a similar but
reduced API that is optimized for sharing images across processes.</note>
<p>In ScreenPlay, a <b>graphics resource</b> is a data buffer that is suitable
for use by graphics acceleration hardware. The requirement for the data buffer
to be capable of hardware acceleration imposes certain restrictions on the
way that it is implemented and used. An <b>image</b> is a particular type
of data buffer—a two-dimensional (2D) pixel buffer. Symbian documentation
has traditionally called 2D pixel buffers bitmaps. However, they are called
images in this context in order to avoid confusion with the existing <xref href="GUID-683A1D42-2764-3EB7-BD19-9E12559199AB.dita"><apiname>CFbsBitmap</apiname></xref> class. </p>
<p>Another important concept when working with the Graphics Resource components
is <b>rendering pipeline</b>. This is a set of primitives that perform rendering
and usually (but not necessarily) implement a pipeline model. The Graphics
Resource components do not define the rendering pipeline. However, when you
create a graphics resource, particularly an image, you need to specify its
usage in terms of the rendering pipeline it is to be used with. Typical examples
of rendering pipelines are DirectGDI, OpenVG and OpenGLES. </p>
<section id="GUID-AA3EF65D-E876-44DE-8E45-0BC2850F75CA"><title>Purpose</title> <p>The
Graphics Resource collection provides the following functionality: </p> <ul>
<li id="GUID-5100C135-C881-5907-BCD3-08818EB5117D"><p> <b>The creation and
sharing of hardware acceleration-capable two-dimensional (2D) pixel buffers </b>  </p> <p>The
Graphics Resource collection provides functions to create 2D pixel buffers
of fixed size in such a way that they can be shared between several user-side
processes and the device drivers of the graphics acceleration hardware if
present. </p> <p>As mentioned above these 2D pixel buffers are called images.
They are encapsulated by the <xref href="GUID-EDC0E03F-37F6-3BEC-8FF3-D03C3CDB949C.dita"><apiname>RSgImage</apiname></xref> class. </p> </li>
<li id="GUID-ADE65736-3D6F-5FFB-B160-A4AD876D3CAD"><p> <b>Interoperability
with the composition components</b>  </p> <p>The Graphics Resource collection
provides functions to create surfaces that can be used by the <xref href="GUID-0DC3E5AA-1706-5255-ACD6-E7AB732E1095.dita">composition
components</xref>. A surface is identified by a unique ID called the surface
ID. </p> <p>Interoperability with the composition components is encapsulated
by the <xref href="GUID-FCF750E4-526C-3789-89D8-DEF02BB7A5A7.dita"><apiname>RSgImageCollection</apiname></xref> class. This class enables the
retrieval of the surface ID for passing in calls to the Surface Manager and
Surface Update Server. <xref href="GUID-FCF750E4-526C-3789-89D8-DEF02BB7A5A7.dita"><apiname>RSgImageCollection</apiname></xref> provides an alternative
view of the surface as a collection of images that are accessible through <xref href="GUID-EDC0E03F-37F6-3BEC-8FF3-D03C3CDB949C.dita"><apiname>RSgImage</apiname></xref> handles. </p> </li>
<li id="GUID-E6513288-B612-5CAB-AF58-40F0A9FF088F"><p> <b> Support for new
types of graphics resources </b>  </p> <p>The Graphics Resource collection
also provides an abstraction so that device creators can add new types of
graphics resources—for example, for handling vector data. </p> <p>Symbian
provides the <xref href="GUID-6F23F34A-A0BE-349C-ADE7-61A5AEF48018.dita"><apiname>RSgDrawable</apiname></xref> class for this purpose. Symbian
provides only one concrete type of graphics resource—the image (2D pixel buffer).
However, device creators can create additional types of resources. </p> </li>
<li id="GUID-E93EB750-03AB-578C-B2A7-E7400971AE8B"><p> <b> Extensibility and
adaptability</b>  </p> <p>The Graphics Resource collection consists of a thin
generic layer and an adaptation layer. Symbian provides a product-quality
reference implementation of the adaptation layer. Device creators can extend,
modify or replace this implementation to suit specific graphics hardware. </p> </li>
</ul> <p>In addition, the Graphics Resource collection provides a number of <xref href="GUID-29C7FBFB-2F33-58CA-86BE-978E3187E4D6.dita">image compatibility guarantees</xref>. </p> <p> <i>Note</i>:
Although the DirectGDI component depends on the Graphics Resource components,
the Graphics Resource components do not depend on DirectGDI. The Graphics
Resource components can be used in isolation from DirectGDI—for example, by
a render stage that does not use DirectGDI. </p> </section>
<section id="GUID-C5E1043E-062E-41EF-A00C-E0072CB90D0F"><title>Components</title> <p>Graphics
Resource collection consists of the following components: </p> <ul>
<li id="GUID-A99A8B07-02C6-570A-A957-26924DDAE206"><p><xref href="GUID-82B0B4B9-6BC2-5BEF-B3B0-D57AC57F8D8A.dita">Graphics
Resource Component</xref>. This is the generic layer. </p> </li>
<li id="GUID-1C4E6CF8-D331-5AF8-9CC3-B0CC825BAFC3"><p><xref href="GUID-5E46C0EE-BD7D-5C85-8083-575BB2888AA7.dita">Graphics
Resource Adaptation component</xref>. This is the adaptation layer, which
device creators can extend, modify or replace. </p> </li>
</ul> </section>
</conbody><related-links>
<link href="GUID-26E51AB0-C0FC-55EA-B747-C834E2D4FD27.dita"><linktext>Graphics
Resources Services Collection</linktext></link>
<link href="GUID-E2A886E1-39FD-517F-870E-3B1BCD49E8CD.dita"><linktext>Off-Screen
Rendering with DirectGDI Tutorial</linktext></link>
</related-links></concept>