update docs

This commit is contained in:
gellert 2016-09-09 23:26:14 +02:00
parent d3dc66e308
commit 5754f3aea0

View file

@ -1063,18 +1063,15 @@ For the `mouseWheel` event, the `event` object also have following properties:
* `callback` Function * `callback` Function
Begin subscribing for presentation events and captured frames, the `callback` Begin subscribing for presentation events and captured frames, the `callback`
will be called with `callback(frameBuffer, dirtyRect)` when there is a will be called with `callback(image, dirtyRect)` when there is a
presentation event. presentation event.
The `frameBuffer` is a `Buffer` that contains raw pixel data. On most machines, The `image` is a [NativeImage](native-image.md) that contains the image data of
the pixel data is effectively stored in 32bit BGRA format, but the actual the frame.
representation depends on the endianness of the processor (most modern
processors are little-endian, on machines with big-endian processors the data
is in 32bit ARGB format).
The `dirtyRect` is an object with `x, y, width, height` properties that The `dirtyRect` is an object with `x, y, width, height` properties that
describes which part of the page was repainted. If `onlyDirty` is set to describes which part of the page was repainted. If `onlyDirty` is set to
`true`, `frameBuffer` will only contain the repainted area. `onlyDirty` `true`, `image` will only contain the repainted area. `onlyDirty`
defaults to `false`. defaults to `false`.
#### `contents.endFrameSubscription()` #### `contents.endFrameSubscription()`