Pepper_56_C++_interfaces
Pepper_56_C++_interfaces
 All Classes Namespaces Files Functions Typedefs Enumerations Macros Groups
compositor_layer.h
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef PPAPI_CPP_COMPOSITOR_LAYER_H_
6 #define PPAPI_CPP_COMPOSITOR_LAYER_H_
7 
8 #include <stdint.h>
9 
10 #include "ppapi/c/ppb_compositor_layer.h"
11 #include "ppapi/cpp/graphics_3d.h"
12 #include "ppapi/cpp/image_data.h"
13 #include "ppapi/cpp/rect.h"
14 #include "ppapi/cpp/resource.h"
15 #include "ppapi/cpp/size.h"
16 
17 namespace pp {
18 
19 class CompositorLayer : public Resource {
20  public:
24 
28  CompositorLayer(const CompositorLayer& other);
29 
33  explicit CompositorLayer(const Resource& resource);
34 
39  CompositorLayer(PassRef, PP_Resource resource);
40 
43 
61  int32_t SetColor(float red,
62  float green,
63  float blue,
64  float alpha,
65  const Size& size);
66 
83  int32_t SetTexture(const Graphics3D& context,
84  uint32_t target,
85  uint32_t texture,
86  const Size& size,
87  const CompletionCallback& cc);
88 
100  int32_t SetImage(const ImageData& image,
101  const CompletionCallback& callback);
102 
117  int32_t SetImage(const ImageData& image,
118  const Size& size,
119  const CompletionCallback& callback);
120 
129  int32_t SetClipRect(const Rect& rect);
130 
137  int32_t SetTransform(const float matrix[16]);
138 
150  int32_t SetOpacity(float opacity);
151 
158  int32_t SetBlendMode(PP_BlendMode mode);
159 
170  int32_t SetSourceRect(const FloatRect& rect);
171 
178  int32_t SetPremultipliedAlpha(bool premult);
179 
187  static bool IsCompositorLayer(const Resource& resource);
188 };
189 
190 } // namespace pp
191 
192 #endif // PPAPI_CPP_COMPOSITOR_LAYER_H_
Definition: rect.h:403
int32_t SetImage(const ImageData &image, const CompletionCallback &callback)
int32_t SetSourceRect(const FloatRect &rect)
int32_t SetColor(float red, float green, float blue, float alpha, const Size &size)
int32_t SetTexture(const Graphics3D &context, uint32_t target, uint32_t texture, const Size &size, const CompletionCallback &cc)
int32_t SetOpacity(float opacity)
Definition: image_data.h:22
Definition: rect.h:21
int32_t SetPremultipliedAlpha(bool premult)
This class represents a 3D rendering context in the browser.
Definition: graphics_3d.h:21
int32_t SetTransform(const float matrix[16])
Definition: completion_callback.h:26
A size of an object based on width and height.
Definition: size.h:18
int32_t SetClipRect(const Rect &rect)
~CompositorLayer()
Destructor.
int32_t SetBlendMode(PP_BlendMode mode)
PassRef
Definition: pass_ref.h:17
Definition: compositor_layer.h:19
A reference counted module resource.
Definition: resource.h:20
static bool IsCompositorLayer(const Resource &resource)