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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 #ifndef _NP_EXTENSIONS_H_ 6 #ifndef _NP_EXTENSIONS_H_
7 #define _NP_EXTENSIONS_H_ 7 #define _NP_EXTENSIONS_H_
8 8
9 #include "third_party/npapi/bindings/npapi.h" 9 #include "third_party/npapi/bindings/npapi.h"
10 10
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 /* 2D -----------------------------------------------------------------------*/ 225 /* 2D -----------------------------------------------------------------------*/
226 226
227 #define NPPepper2DDevice 1 227 #define NPPepper2DDevice 1
228 228
229 typedef struct _NPDeviceContext2DConfig { 229 typedef struct _NPDeviceContext2DConfig {
230 } NPDeviceContext2DConfig; 230 } NPDeviceContext2DConfig;
231 231
232 typedef struct _NPDeviceContext2D 232 typedef struct _NPDeviceContext2D
233 { 233 {
234 /* Internal value used by the browser to identify this device.
235 */
234 void* reserved; 236 void* reserved;
237
238 /* A pointer to the pixel data. This data is 8-bit values in BGRA order in
239 * memory. Each row will start |stride| bytes after the previous one.
240 *
241 * THIS DATA USES PREMULTIPLIED ALPHA. This means that each color channel has
242 * been multiplied with the corresponding alpha, which makes compositing
243 * easier. If any color channels have a value greater than the alpha value,
244 * you'll likely get crazy colors and weird artifacts.
245 */
235 void* region; 246 void* region;
247
248 /* Length of each row of pixels in bytes. This may be larger than width * 4
249 * if there is padding at the end of each row to help with alignment.
250 */
236 int32 stride; 251 int32 stride;
237 252
238 /* The dirty region that the plugin has painted into the buffer. This 253 /* The dirty region that the plugin has painted into the buffer. This
239 * will be initialized to the size of the plugin image in 254 * will be initialized to the size of the plugin image in
240 * initializeContextPtr. The plugin can change the values to only 255 * initializeContextPtr. The plugin can change the values to only
241 * update portions of the image. 256 * update portions of the image.
242 */ 257 */
243 struct { 258 struct {
244 int32 left; 259 int32 left;
245 int32 top; 260 int32 top;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 int32 commandBufferEntries; 294 int32 commandBufferEntries;
280 295
281 // Offset in command buffer reader has reached. Synchronized on flush. 296 // Offset in command buffer reader has reached. Synchronized on flush.
282 int32 getOffset; 297 int32 getOffset;
283 298
284 // Offset in command buffer writer has reached. Synchronized on flush. 299 // Offset in command buffer writer has reached. Synchronized on flush.
285 int32 putOffset; 300 int32 putOffset;
286 } NPDeviceContext3D; 301 } NPDeviceContext3D;
287 302
288 #endif /* _NP_EXTENSIONS_H_ */ 303 #endif /* _NP_EXTENSIONS_H_ */
OLDNEW
« 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