Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1179)

Unified Diff: third_party/npapi/bindings/npapi_extensions.h

Issue 524074: Clarify the byte ordering and premultiplied-ness of the Pepper 2D data.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/npapi/bindings/npapi_extensions.h
===================================================================
--- third_party/npapi/bindings/npapi_extensions.h (revision 35799)
+++ third_party/npapi/bindings/npapi_extensions.h (working copy)
@@ -231,8 +231,23 @@
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698