Fix compilation error
This commit is contained in:
parent
ee0d48dc5a
commit
ec90d03d74
1 changed files with 5 additions and 6 deletions
|
@ -9,7 +9,6 @@
|
||||||
#include "atom/browser/browser.h"
|
#include "atom/browser/browser.h"
|
||||||
#include "atom/browser/native_window.h"
|
#include "atom/browser/native_window.h"
|
||||||
#include "atom/common/node_includes.h"
|
#include "atom/common/node_includes.h"
|
||||||
#include "atom/common/options_switches.h"
|
|
||||||
#include "atom/common/event_types.h"
|
#include "atom/common/event_types.h"
|
||||||
#include "atom/common/native_mate_converters/callback.h"
|
#include "atom/common/native_mate_converters/callback.h"
|
||||||
#include "atom/common/native_mate_converters/gfx_converter.h"
|
#include "atom/common/native_mate_converters/gfx_converter.h"
|
||||||
|
@ -21,7 +20,6 @@
|
||||||
#include "native_mate/constructor.h"
|
#include "native_mate/constructor.h"
|
||||||
#include "native_mate/dictionary.h"
|
#include "native_mate/dictionary.h"
|
||||||
#include "ui/gfx/geometry/rect.h"
|
#include "ui/gfx/geometry/rect.h"
|
||||||
#include "v8/include/v8.h"
|
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
#include "atom/browser/native_window_views.h"
|
#include "atom/browser/native_window_views.h"
|
||||||
|
@ -112,10 +110,11 @@ void Window::WillCloseWindow(bool* prevent_default) {
|
||||||
void Window::OnFrameRendered(scoped_ptr<uint8[]> rgb, const int size) {
|
void Window::OnFrameRendered(scoped_ptr<uint8[]> rgb, const int size) {
|
||||||
v8::Locker locker(isolate());
|
v8::Locker locker(isolate());
|
||||||
v8::HandleScope handle_scope(isolate());
|
v8::HandleScope handle_scope(isolate());
|
||||||
|
v8::MaybeLocal<v8::Object> data = node::Buffer::New(
|
||||||
auto data = node::Buffer::New(isolate(), reinterpret_cast<const char*>(rgb.get()), static_cast<size_t>(size));
|
isolate(),
|
||||||
|
reinterpret_cast<char*>(rgb.release()),
|
||||||
Emit("frame-rendered", data, size);
|
static_cast<size_t>(size));
|
||||||
|
Emit("frame-rendered", data.ToLocalChecked(), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::OnWindowClosed() {
|
void Window::OnWindowClosed() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue