![Inheritance graph](/web/20230424200307im_/https://developer.chrome.com/docs/native-client/pepper_dev/cpp/classpp_1_1_compositor__inherit__graph.png)
Public Member Functions
Compositor () | |
Compositor (const InstanceHandle &instance;) | |
Compositor (const Compositor &other;) | |
Compositor (const Resource &resource;) | |
Compositor (PassRef, PP_Resource resource) | |
~Compositor () | |
CompositorLayer | AddLayer () |
int32_t | CommitLayers (const CompletionCallback &cc;) |
int32_t | ResetLayers () |
Static Public Member Functions
static bool | IsCompositor (const Resource &resource;) |
Detailed Description
The Compositor
interface is used for setting CompositorLayer
layers to the Chromium compositor for compositing.
This allows a plugin to combine different sources of visual data efficiently, such as ImageData
images and OpenGL textures. See also CompositorLayer
for more information.
Constructor & Destructor Documentation
Default constructor for creating an is_null() Compositor
object.
pp::Compositor::Compositor | ( | const InstanceHandle & | instance | ) | [explicit] |
A constructor for creating and initializing a compositor.
On failure, the object will be is_null().
pp::Compositor::Compositor | ( | const Compositor & | other | ) |
The copy constructor for Compositor
.
- Parameters:
[in] other A reference to a Compositor
.
pp::Compositor::Compositor | ( | const Resource & | resource | ) | [explicit] |
Constructs a Compositor
from a Resource
.
- Parameters:
[in] resource A PPB_Compositor
resource.
pp::Compositor::Compositor | ( | PassRef | , |
PP_Resource | resource | ||
) |
A constructor used when you have received a PP_Resource
as a return value that has had 1 ref added on behalf of the caller.
- Parameters:
[in] resource A PPB_Compositor
resource.
Destructor.
Member Function Documentation
Creates a new CompositorLayer
and adds it to the end of the layer stack.
A CompositorLayer
containing the layer is returned. It is uninitialized, SetColor()
, SetTexture
or SetImage
should be used to initialize it. The layer will appear above other pre-existing layers. If ResetLayers
is called or the PPB_Compositor
is released, the returned layer will be invalidated, and any further calls on the layer will return PP_ERROR_BADRESOURCE
.
- Returns:
- A
CompositorLayer
containing the compositor layer resource.
int32_t pp::Compositor::CommitLayers | ( | const CompletionCallback & | cc | ) |
Commits layers added by AddLayer()
to the chromium compositor.
- Parameters:
[in] cc A CompletionCallback
to be called when layers have been represented on screen.
- Returns:
- An int32_t containing a result code from
pp_errors.h
.
static bool pp::Compositor::IsCompositor | ( | const Resource & | resource | ) | [static] |
Checks whether a Resource
is a compositor, to test whether it is appropriate for use with the Compositor
constructor.
- Parameters:
[in] resource A Resource
to test.
- Returns:
- True if
resource
is a compositor.
int32_t pp::Compositor::ResetLayers | ( | ) |
Resets layers added by AddLayer()
- Returns:
- An int32_t containing a result code from
pp_errors.h
.
The documentation for this class was generated from the following file: