renames to bytesPerPixel and use nullptr
This commit is contained in:
parent
8a5e96056e
commit
ca16132268
3 changed files with 6 additions and 6 deletions
|
@ -1354,7 +1354,7 @@ void WebContents::OnPaint(const gfx::Rect& dirty_rect,
|
||||||
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate());
|
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate());
|
||||||
dict.Set("width", bitmap_size.width());
|
dict.Set("width", bitmap_size.width());
|
||||||
dict.Set("height", bitmap_size.height());
|
dict.Set("height", bitmap_size.height());
|
||||||
dict.Set("pixel", pixel_size);
|
dict.Set("bytesPerPixel", pixel_size);
|
||||||
|
|
||||||
if (!buffer.IsEmpty())
|
if (!buffer.IsEmpty())
|
||||||
Emit("paint", dirty_rect, buffer.ToLocalChecked(), dict);
|
Emit("paint", dirty_rect, buffer.ToLocalChecked(), dict);
|
||||||
|
|
|
@ -381,11 +381,11 @@ OffScreenRenderWidgetHostView::~OffScreenRenderWidgetHostView() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (copy_frame_generator_.get())
|
if (copy_frame_generator_.get())
|
||||||
copy_frame_generator_.reset(NULL);
|
copy_frame_generator_.reset(nullptr);
|
||||||
|
|
||||||
delegated_frame_host_.reset(NULL);
|
delegated_frame_host_.reset(nullptr);
|
||||||
compositor_.reset(NULL);
|
compositor_.reset(nullptr);
|
||||||
root_layer_.reset(NULL);
|
root_layer_.reset(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenRenderWidgetHostView::OnBeginFrameTimerTick() {
|
void OffScreenRenderWidgetHostView::OnBeginFrameTimerTick() {
|
||||||
|
|
|
@ -471,7 +471,7 @@ Returns:
|
||||||
* `bitmapSize` Object
|
* `bitmapSize` Object
|
||||||
* `width` Number - the width of the whole bitmap
|
* `width` Number - the width of the whole bitmap
|
||||||
* `height` Number - the height of the whole bitmap
|
* `height` Number - the height of the whole bitmap
|
||||||
* `pixel` Number - The number of bytes per pixel
|
* `bytesPerPixel` Number - The number of bytes per pixel in the bitmap
|
||||||
|
|
||||||
Emitted when a new frame is generated. Only the dirty area is passed in the
|
Emitted when a new frame is generated. Only the dirty area is passed in the
|
||||||
buffer.
|
buffer.
|
||||||
|
|
Loading…
Reference in a new issue