Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 1839

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- HWacceleration.qdoc -->
  <title>Qt 4.8: Hardware Acceleration and Embedded Platforms.</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li>Hardware Acceleration and Embedded Platforms.</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#abstract">Abstract</a></li>
<li class="level1"><a href="#hardware-acceleration">Hardware Acceleration</a></li>
<li class="level2"><a href="#qt-for-embedded-graphics-pipeline">Qt for Embedded Graphics pipeline</a></li>
<li class="level2"><a href="#hardware-configuration-requirements">Hardware configuration requirements</a></li>
<li class="level3"><a href="#different-architectures">Different architectures</a></li>
<li class="level3"><a href="#recommended-use-of-hardware-acceleration-based-on-hardware">Recommended use of hardware acceleration based on hardware</a></li>
<li class="level1"><a href="#supported-platforms">Supported platforms</a></li>
</ul>
</div>
<h1 class="title">Hardware Acceleration and Embedded Platforms.</h1>
<span class="subtitle"></span>
<!-- $$$HWAcc_rendering.html-description -->
<div class="descr"> <a name="details"></a>
<a name="abstract"></a>
<h2>Abstract</h2>
<p>This document describes how to use hardware acceleration for fast rendering on embedded platforms supported by Qt. In short, it explains how the graphics pipeline works. Since there might be differences to how the APIs are being used on different embedded platforms, a table links to documentation dedicated to platform specific documentation for each supported hardware acceleration API.</p>
<a name="hardware-acceleration"></a>
<h2>Hardware Acceleration</h2>
<p>When designing applications for embedded devices there is often a compromise between graphics effects and performance. On most devices, you cannot have both simply because the hardware needed for such operations just is not there. With a growing number of devices that use hardware dedicated to graphics operations there is less need to compromise.</p>
<p>In addition to enabling dynamic graphics effects, there are two other benefits to using graphics acceleration. One is that graphics acceleration hardware is more power efficient than using the CPU. The reason for this is that the CPU might require a clock speed that is up to 20 times higher than the GPU, achieving the same results. E.g&#x2e; a typical hardware accelerated mobile graphics unit can rasterize one or two bilinear texture fetches in one cycle, while a software implementation takes easily more than 20 cycles. Typical <i>System-on-a-chip</i> (SoC) graphics hardware generally have a much lower clock speed and memory bandwidth, and different level of acceleration than desktop GPUs. One example is that many GPUs leave out transformation and lighting from the graphics pipeline and only implements rasterization.</p>
<p>Another reason to use a GPU is to offload the main CPU, either for power saving or to perform other operations in parallel. Often drawing speed with a GPU is not that much faster than a CPU but the clear benefit of using the GPU is to free up the CPU to perform other tasks which can be used to create a more responsive use experience.</p>
<p>The key to writing good applications for devices is therefore to limit the wow factor down to what the target hardware can handle, and to take advantage of any graphics dedicated hardware. Qt provides several ways to both render advanced effects on the screen and speed up your application using hardware accelerated graphics.</p>
<a name="qt-for-embedded-graphics-pipeline"></a>
<h3>Qt for Embedded Graphics pipeline</h3>
<p>Qt uses <a href="qpainter.html">QPainter</a> for all graphics operations. By using the same API regardless of platform, the code can be reused on different devices. <a href="qpainter.html">QPainter</a> use different paint engines implemented in the <a href="qpaintengine.html">QPaintEngine</a> API to do the actual painting.</p>
<p>The <a href="qpaintengine.html">QPaintEngine</a> API provides paint engines for each window system and painting framework supported by Qt. In regards to Qt for Embedded, this also includes implementations for OpenGL ES versions 1.1 and 2.0, as well as OpenVG and DirectFB(Embedded Linux only).</p>
<p>By using one of these paint engines, you will be able to improve the graphics performance of your Qt application. However, if the graphics operations used are not supported, this might as well be a trap, slowing down your application significantly. This all depends on what kind of graphics operations that are supported by the target devices hardware configuration.</p>
<p class="centerAlign"><img src="images/platformHWAcc.png" alt="" /></p><p>The paint engine will direct all graphics operations supported by the devices hardware to the GPU, and from there they are sent to the framebuffer. Unsupported graphics operations falls back to the <a href="qrasterpaintengine.html">QRasterPaintEngine</a> and are handled by the CPU before sent to the framebuffer. In the end, the operating system sends the paint updates off to the screen/display. The fallback operation is quite expensive in regards to memory consumption, and should be avoided.</p>
<a name="hardware-configuration-requirements"></a>
<h3>Hardware configuration requirements</h3>
<p>Before implementing any application using hardware acceleration, it is wise to get an overview of what kind of hardware accelerated graphics operations that are available for the target device.</p>
<p><b>Note:</b> On devices with no hardware acceleration, Qt will use <a href="qrasterpaintengine.html">QRasterPaintEngine</a>, which handles the acceleration using software. On devices supporting OpenGL ES, OpenVG or DirectFB(not supported by Windows CE), Qt will use the respective paint engines to accelerate painting. However, hardware configurations that only support a limited set of hardware acceleration features, might slow the application graphics down rather than speeding it up when using unsupported operations that must fall back to the raster engine.</p>
<a name="different-architectures"></a>
<h4>Different architectures</h4>
<p>Based on the architecture used in a device we can make a recommendation on which hardware acceleration techniques to use. There are mainly two different architectures on embedded devices. These are devices with a Unified Memory Architecture (UMA), and devices with dedicated graphics memory. Generally, high-end devices will have dedicated graphics memory. Low-end devices will just use system memory, sometimes reserving a memory region and sometimes not.</p>
<p>In addition to this, we can categorize the devices into five types based on the different graphics operations supported by their hardware.</p>
<ol class="1">
<li>No support for graphics acceleration.</li>
<li>Support for blitter and alpha blending.</li>
<li>Support for path based 2D vector graphics.</li>
<li>Support for fixed function 3D graphics.</li>
<li>Support for programmable 3D graphics.</li>
</ol>
<p>Based on these characteristics the table below recommends which paint engines to use with the different types of hardware configurations.</p>
<a name="recommended-use-of-hardware-acceleration-based-on-hardware"></a>
<h4>Recommended use of hardware acceleration based on hardware</h4>
<table class="generic">
<thead><tr class="qt-style"><th >Type</th><th >UMA</th><th >Non-UMA</th></tr></thead>
<tr valign="top" class="odd"><td ><b>None</b></td><td >Qt Raster Engine</td><td >Qt Raster Engine</td></tr>
<tr valign="top" class="even"><td ><b>Blitter</b></td><td >DirectFB</td><td >DirectFB</td></tr>
<tr valign="top" class="odd"><td ><b>2D Vector</b></td><td >OpenVG</td><td >OpenVG</td></tr>
<tr valign="top" class="even"><td ><b>Fixed 3D</b></td><td >OpenGL (ES) 1.x</td><td >OpenGL (ES) 1.x</td></tr>
<tr valign="top" class="odd"><td ><b>Programmable 3D</b></td><td >OpenGL (ES) 2.x</td><td >OpenGL (ES) 2.x</td></tr>
</table>
<p><b>Note:</b> Since the DirectFB API is quite primitive, the raster paint engine handles most of the operations.</p>
<p><b>Note:</b> Blitter and Alpha blending is currently not supported on Windows CE.</p>
<a name="supported-platforms"></a>
<h2>Supported platforms</h2>
<p>Since there might be differences to how the APIs are being used on the different embedded platforms, this table provides you with links to pages dedicated to platform specific documentation for each supported hardware acceleration API. Click the API link for the platform to go the correct documentation.</p>
<table class="generic">
<thead><tr class="qt-style"><th >Operating System</th><th  colspan="3">Hardware Acceleration Platform</th></tr></thead>
<tr valign="top" class="odd"><td ><b>Windows CE</b></td><td ><a href="windowsce-opengl.html">OpenGL ES</a></td><td ><a href="windowsce-openvg.html">OpenVG</a></td><td ></td></tr>
<tr valign="top" class="even"><td ><b>Embedded Linux</b></td><td ><a href="qt-embeddedlinux-opengl.html">OpenGL ES</a></td><td ><a href="qt-embeddedlinux-openvg.html">OpenVG</a></td><td ><a href="qt-embeddedlinux-directfb.html">DirectFB</a></td></tr>
<tr valign="top" class="odd"><td ><b>Symbian Platform</b></td><td  colspan="3"><i>There are currently no support for hardware acceleration.</i></td></tr>
</table>
</div>
<!-- @@@HWAcc_rendering.html -->
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>