summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-11 18:51:36 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-11 18:51:36 +0000
commitd8fcf77c1946a7c5eaa8907f50a7e5df163a1a41 (patch)
tree795c171cfbf832d9ea7c61f3cfb14ce33055d12a /third_party
parent551c0ffd523786298b5313a50564494afd056745 (diff)
downloadchromium_src-d8fcf77c1946a7c5eaa8907f50a7e5df163a1a41.zip
chromium_src-d8fcf77c1946a7c5eaa8907f50a7e5df163a1a41.tar.gz
chromium_src-d8fcf77c1946a7c5eaa8907f50a7e5df163a1a41.tar.bz2
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
Diffstat (limited to 'third_party')
-rw-r--r--third_party/npapi/bindings/npapi_extensions.h15
1 files changed, 15 insertions, 0 deletions
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