chromium/native_client_sdk/doc_generated/pepper_dev/cpp/classpp_1_1_compositor.html

{{+bindTo:partials.standard_nacl_api}}
<h1>pp::Compositor Class Reference</h1>
<div id="doxygen-ref">
{{- dummy div to appease doxygen -}}
  <div>
<!-- Generated by Doxygen 1.7.6.1 -->



</div>
<!--header-->
<div class="contents">
<!-- doxytag: class="pp::Compositor" --><!-- doxytag: inherits="pp::Resource" --><div class="dynheader">
Inheritance diagram for pp::Compositor:</div>
<div class="dyncontent">
<div class="center"><img src="classpp_1_1_compositor__inherit__graph.png" border="0" usemap="#pp_1_1_compositor_inherit__map" alt="Inheritance graph" /></div>
<map name="pp_1_1_compositor_inherit__map" id="pp_1_1_compositor_inherit__map">
<area shape="rect" id="node2" href="classpp_1_1_resource.html" title="A reference counted module resource." alt="" coords="13,5,117,32"></area></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="classpp_1_1_compositor-members.html">List of all members.</a></p>
<h2>
Public Member Functions</h2><table class="memberdecls">

<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_compositor.html#abe16adaeaac2569518d28e070ce487b2">Compositor</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_compositor.html#a0dc88d1d68ca2ab34f0c8ffa1a0b2f4b">Compositor</a> (const <a class="el" href="classpp_1_1_instance_handle.html">InstanceHandle</a> &amp;instance)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_compositor.html#a30abcad5657f2b7779c20764f9026460">Compositor</a> (const <a class="el" href="classpp_1_1_compositor.html">Compositor</a> &amp;other)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_compositor.html#ad1130a511519ff5a5bc7bfae44cb0b6d">Compositor</a> (const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_compositor.html#a43e403e54998200768d198ae95571461">Compositor</a> (<a class="el" href="namespacepp.html#a339083c1beec620267bf8b3c55decaa5">PassRef</a>, PP_Resource resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_compositor.html#abf2a4c7ef3a0a727d1b80a5cd2f39729">~Compositor</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_compositor_layer.html">CompositorLayer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_compositor.html#adddfb226d04f6169def30afe3639c15d">AddLayer</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_compositor.html#ad9171e29e89900cccd7c10cc4654cae1">CommitLayers</a> (const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> &amp;cc)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_compositor.html#a178daa26f7dd593a6905235fa840d54b">ResetLayers</a> ()</td></tr>
</table><h2>
Static Public Member Functions</h2><table class="memberdecls">
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_compositor.html#ab699455da240e4a7ed01740b4c05d81f">IsCompositor</a> (const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;resource)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <code><a class="el" href="classpp_1_1_compositor.html" title="The Compositor interface is used for setting CompositorLayer layers to the Chromium compositor for co...">Compositor</a></code> interface is used for setting <code><a class="el" href="classpp_1_1_compositor_layer.html">CompositorLayer</a></code> layers to the Chromium compositor for compositing. </p>
<p>This allows a plugin to combine different sources of visual data efficiently, such as <code><a class="el" href="classpp_1_1_image_data.html">ImageData</a></code> images and OpenGL textures. See also <code><a class="el" href="classpp_1_1_compositor_layer.html">CompositorLayer</a></code> for more information. </p>
</div><hr /><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="abe16adaeaac2569518d28e070ce487b2"></a><!-- doxytag: member="pp::Compositor::Compositor" ref="abe16adaeaac2569518d28e070ce487b2" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_compositor.html#abe16adaeaac2569518d28e070ce487b2">pp::Compositor::Compositor</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Default constructor for creating an <a class="el" href="classpp_1_1_resource.html#a859068e34cdc2dc0b78754c255323aa9" title="This functions determines if this resource is invalid or uninitialized.">is_null()</a> <code><a class="el" href="classpp_1_1_compositor.html" title="The Compositor interface is used for setting CompositorLayer layers to the Chromium compositor for co...">Compositor</a></code> object. </p>
</div>
</div>
<a class="anchor" id="a0dc88d1d68ca2ab34f0c8ffa1a0b2f4b"></a><!-- doxytag: member="pp::Compositor::Compositor" ref="a0dc88d1d68ca2ab34f0c8ffa1a0b2f4b" args="(const InstanceHandle &amp;instance)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_compositor.html#abe16adaeaac2569518d28e070ce487b2">pp::Compositor::Compositor</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_instance_handle.html">InstanceHandle</a> &amp;&#160;</td>
<td class="paramname"><em>instance</em></td><td>)</td>
<td><code> [explicit]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor for creating and initializing a compositor. </p>
<p>On failure, the object will be <a class="el" href="classpp_1_1_resource.html#a859068e34cdc2dc0b78754c255323aa9" title="This functions determines if this resource is invalid or uninitialized.">is_null()</a>. </p>
</div>
</div>
<a class="anchor" id="a30abcad5657f2b7779c20764f9026460"></a><!-- doxytag: member="pp::Compositor::Compositor" ref="a30abcad5657f2b7779c20764f9026460" args="(const Compositor &amp;other)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_compositor.html#abe16adaeaac2569518d28e070ce487b2">pp::Compositor::Compositor</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_compositor.html">Compositor</a> &amp;&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The copy constructor for <code><a class="el" href="classpp_1_1_compositor.html" title="The Compositor interface is used for setting CompositorLayer layers to the Chromium compositor for co...">Compositor</a></code>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>A reference to a <code><a class="el" href="classpp_1_1_compositor.html" title="The Compositor interface is used for setting CompositorLayer layers to the Chromium compositor for co...">Compositor</a></code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ad1130a511519ff5a5bc7bfae44cb0b6d"></a><!-- doxytag: member="pp::Compositor::Compositor" ref="ad1130a511519ff5a5bc7bfae44cb0b6d" args="(const Resource &amp;resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_compositor.html#abe16adaeaac2569518d28e070ce487b2">pp::Compositor::Compositor</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;&#160;</td>
<td class="paramname"><em>resource</em></td><td>)</td>
<td><code> [explicit]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Constructs a <code><a class="el" href="classpp_1_1_compositor.html" title="The Compositor interface is used for setting CompositorLayer layers to the Chromium compositor for co...">Compositor</a></code> from a <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PPB_Compositor</code> resource. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a43e403e54998200768d198ae95571461"></a><!-- doxytag: member="pp::Compositor::Compositor" ref="a43e403e54998200768d198ae95571461" args="(PassRef, PP_Resource resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_compositor.html#abe16adaeaac2569518d28e070ce487b2">pp::Compositor::Compositor</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespacepp.html#a339083c1beec620267bf8b3c55decaa5">PassRef</a>&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">PP_Resource&#160;</td>
<td class="paramname"><em>resource</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor used when you have received a <code>PP_Resource</code> as a return value that has had 1 ref added on behalf of the caller. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PPB_Compositor</code> resource. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="abf2a4c7ef3a0a727d1b80a5cd2f39729"></a><!-- doxytag: member="pp::Compositor::~Compositor" ref="abf2a4c7ef3a0a727d1b80a5cd2f39729" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_compositor.html#abf2a4c7ef3a0a727d1b80a5cd2f39729">pp::Compositor::~Compositor</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<hr /><h2>Member Function Documentation</h2>
<a class="anchor" id="adddfb226d04f6169def30afe3639c15d"></a><!-- doxytag: member="pp::Compositor::AddLayer" ref="adddfb226d04f6169def30afe3639c15d" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_compositor_layer.html">CompositorLayer</a> <a class="el" href="classpp_1_1_compositor.html#adddfb226d04f6169def30afe3639c15d">pp::Compositor::AddLayer</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new <code><a class="el" href="classpp_1_1_compositor_layer.html">CompositorLayer</a></code> and adds it to the end of the layer stack. </p>
<p>A <code><a class="el" href="classpp_1_1_compositor_layer.html">CompositorLayer</a></code> containing the layer is returned. It is uninitialized, <code>SetColor()</code>, <code>SetTexture</code> or <code>SetImage</code> should be used to initialize it. The layer will appear above other pre-existing layers. If <code>ResetLayers</code> is called or the <code>PPB_Compositor</code> is released, the returned layer will be invalidated, and any further calls on the layer will return <code>PP_ERROR_BADRESOURCE</code>.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code><a class="el" href="classpp_1_1_compositor_layer.html">CompositorLayer</a></code> containing the compositor layer resource. </dd></dl>
</div>
</div>
<a class="anchor" id="ad9171e29e89900cccd7c10cc4654cae1"></a><!-- doxytag: member="pp::Compositor::CommitLayers" ref="ad9171e29e89900cccd7c10cc4654cae1" args="(const CompletionCallback &amp;cc)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_compositor.html#ad9171e29e89900cccd7c10cc4654cae1">pp::Compositor::CommitLayers</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> &amp;&#160;</td>
<td class="paramname"><em>cc</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Commits layers added by <code><a class="el" href="classpp_1_1_compositor.html#adddfb226d04f6169def30afe3639c15d" title="Creates a new CompositorLayer and adds it to the end of the layer stack.">AddLayer()</a></code> to the chromium compositor. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">cc</td><td>A <code><a class="el" href="classpp_1_1_completion_callback.html" title="This API enables you to implement and receive callbacks when Pepper operations complete asynchronousl...">CompletionCallback</a></code> to be called when layers have been represented on screen.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing a result code from <code>pp_errors.h</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="ab699455da240e4a7ed01740b4c05d81f"></a><!-- doxytag: member="pp::Compositor::IsCompositor" ref="ab699455da240e4a7ed01740b4c05d81f" args="(const Resource &amp;resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static bool <a class="el" href="classpp_1_1_compositor.html#ab699455da240e4a7ed01740b4c05d81f">pp::Compositor::IsCompositor</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;&#160;</td>
<td class="paramname"><em>resource</em></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Checks whether a <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code> is a compositor, to test whether it is appropriate for use with the <code><a class="el" href="classpp_1_1_compositor.html" title="The Compositor interface is used for setting CompositorLayer layers to the Chromium compositor for co...">Compositor</a></code> constructor. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code> to test.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if <code>resource</code> is a compositor. </dd></dl>
</div>
</div>
<a class="anchor" id="a178daa26f7dd593a6905235fa840d54b"></a><!-- doxytag: member="pp::Compositor::ResetLayers" ref="a178daa26f7dd593a6905235fa840d54b" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_compositor.html#a178daa26f7dd593a6905235fa840d54b">pp::Compositor::ResetLayers</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Resets layers added by <code><a class="el" href="classpp_1_1_compositor.html#adddfb226d04f6169def30afe3639c15d" title="Creates a new CompositorLayer and adds it to the end of the layer stack.">AddLayer()</a></code> </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing a result code from <code>pp_errors.h</code>. </dd></dl>
</div>
</div>
<hr />The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="compositor_8h.html">compositor.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}