summaryrefslogtreecommitdiffstats
path: root/ppapi/c/pp_rect.h
diff options
context:
space:
mode:
authormiletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-06 18:57:38 +0000
committermiletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-06 18:57:38 +0000
commitf55c05ea8abc69cb414fa6ce3919f6b9f50ca39a (patch)
tree4ff639f7a4a8d23cae24d4b56d7ccc41678f54a5 /ppapi/c/pp_rect.h
parentc69f87070b21309fc9c0b727b2e1f8ef6f58f61f (diff)
downloadchromium_src-f55c05ea8abc69cb414fa6ce3919f6b9f50ca39a.zip
chromium_src-f55c05ea8abc69cb414fa6ce3919f6b9f50ca39a.tar.gz
chromium_src-f55c05ea8abc69cb414fa6ce3919f6b9f50ca39a.tar.bz2
[PPAPI] API definition for compositor artifacts
API Proposal http://goo.gl/V7xcu3 BUG=374383 R=binji@chromium.org, dmichael@chromium.org, mpearson@chromium.org, piman@chromium.org, raymes@chromium.org, yzshen@chromium.org Review URL: https://codereview.chromium.org/292523003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275490 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c/pp_rect.h')
-rw-r--r--ppapi/c/pp_rect.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/ppapi/c/pp_rect.h b/ppapi/c/pp_rect.h
index 38825c3..60002f8 100644
--- a/ppapi/c/pp_rect.h
+++ b/ppapi/c/pp_rect.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From pp_rect.idl modified Wed Oct 5 14:06:02 2011. */
+/* From pp_rect.idl modified Tue Jun 3 12:31:06 2014. */
#ifndef PPAPI_C_PP_RECT_H_
#define PPAPI_C_PP_RECT_H_
@@ -37,6 +37,20 @@ struct PP_Rect {
struct PP_Size size;
};
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Rect, 16);
+
+/**
+ * The <code>PP_FloatRect</code> struct contains the size and location of a 2D
+ * rectangle.
+ */
+struct PP_FloatRect {
+ /**
+ * This value represents the x and y coordinates of the upper-left corner of
+ * the rectangle.
+ */
+ struct PP_FloatPoint point;
+ /** This value represents the width and height of the rectangle. */
+ struct PP_FloatSize size;
+};
/**
* @}
*/
@@ -69,6 +83,30 @@ PP_INLINE struct PP_Rect PP_MakeRectFromXYWH(int32_t x, int32_t y,
ret.size.height = h;
return ret;
}
+
+/**
+ * PP_MakeFloatRectFromXYWH() creates a <code>PP_FloatRect</code> given x and y
+ * coordinates and width and height dimensions as float values.
+ *
+ * @param[in] x An float value representing a horizontal coordinate of a
+ * point, starting with 0 as the left-most coordinate.
+ * @param[in] y An float value representing a vertical coordinate of a point,
+ * starting with 0 as the top-most coordinate.
+ * @param[in] w An float value representing a width.
+ * @param[in] h An float value representing a height.
+ *
+ * @return A <code>PP_FloatRect</code> structure.
+ */
+PP_INLINE struct PP_FloatRect PP_MakeFloatRectFromXYWH(float x, float y,
+ float w, float h) {
+ struct PP_FloatRect ret;
+ ret.point.x = x;
+ ret.point.y = y;
+ ret.size.width = w;
+ ret.size.height = h;
+ return ret;
+}
+
/**
* @}
*/