From d8fcf77c1946a7c5eaa8907f50a7e5df163a1a41 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Mon, 11 Jan 2010 18:51:36 +0000 Subject: Clarify the byte ordering and premultiplied-ness of the Pepper 2D data. BUG=none TEST=none (no code change) Review URL: http://codereview.chromium.org/524074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35918 0039d316-1c4b-4281-b951-d872f2087c98 --- third_party/npapi/bindings/npapi_extensions.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'third_party') diff --git a/third_party/npapi/bindings/npapi_extensions.h b/third_party/npapi/bindings/npapi_extensions.h index 1c102bd..32d7374 100644 --- a/third_party/npapi/bindings/npapi_extensions.h +++ b/third_party/npapi/bindings/npapi_extensions.h @@ -231,8 +231,23 @@ typedef struct _NPDeviceContext2DConfig { typedef struct _NPDeviceContext2D { + /* Internal value used by the browser to identify this device. + */ void* reserved; + + /* A pointer to the pixel data. This data is 8-bit values in BGRA order in + * memory. Each row will start |stride| bytes after the previous one. + * + * THIS DATA USES PREMULTIPLIED ALPHA. This means that each color channel has + * been multiplied with the corresponding alpha, which makes compositing + * easier. If any color channels have a value greater than the alpha value, + * you'll likely get crazy colors and weird artifacts. + */ void* region; + + /* Length of each row of pixels in bytes. This may be larger than width * 4 + * if there is padding at the end of each row to help with alignment. + */ int32 stride; /* The dirty region that the plugin has painted into the buffer. This -- cgit v1.1