diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 86ed8edb83..819f0e105d 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -1322,9 +1322,9 @@ void WebContents::OnCursorChange(const content::WebCursor& cursor) { if (cursor.IsCustom()) { Emit("cursor-changed", CursorTypeToString(info), gfx::Image::CreateFrom1xBitmap(info.custom_image), - gfx::Rect(info.custom_image.width(), info.custom_image.height()), - info.hotspot, - info.image_scale_factor); + info.image_scale_factor, + gfx::Size(info.custom_image.width(), info.custom_image.height()), + info.hotspot); } else { Emit("cursor-changed", CursorTypeToString(info)); } diff --git a/atom/common/api/atom_api_native_image.cc b/atom/common/api/atom_api_native_image.cc index 63501aba2a..187ec7f48e 100644 --- a/atom/common/api/atom_api_native_image.cc +++ b/atom/common/api/atom_api_native_image.cc @@ -220,7 +220,7 @@ v8::Local NativeImage::ToPNG(v8::Isolate* isolate) { static_cast(png->size())).ToLocalChecked(); } -v8::Local NativeImage::ToRawBuffer(v8::Isolate* isolate) { +v8::Local NativeImage::ToBitmap(v8::Isolate* isolate) { const SkBitmap* bitmap = image_.ToSkBitmap(); SkPixelRef* ref = bitmap->pixelRef(); return node::Buffer::Copy(isolate, @@ -359,7 +359,7 @@ void NativeImage::BuildPrototype( mate::ObjectTemplateBuilder(isolate, prototype) .SetMethod("toPNG", &NativeImage::ToPNG) .SetMethod("toJPEG", &NativeImage::ToJPEG) - .SetMethod("toBUFFER", &NativeImage::ToRawBuffer) + .SetMethod("toBitmap", &NativeImage::ToBitmap) .SetMethod("getNativeHandle", &NativeImage::GetNativeHandle) .SetMethod("toDataURL", &NativeImage::ToDataURL) .SetMethod("isEmpty", &NativeImage::IsEmpty) diff --git a/atom/common/api/atom_api_native_image.h b/atom/common/api/atom_api_native_image.h index d3ddad17db..6702b33574 100644 --- a/atom/common/api/atom_api_native_image.h +++ b/atom/common/api/atom_api_native_image.h @@ -70,7 +70,7 @@ class NativeImage : public mate::Wrappable { private: v8::Local ToPNG(v8::Isolate* isolate); v8::Local ToJPEG(v8::Isolate* isolate, int quality); - v8::Local ToRawBuffer(v8::Isolate* isolate); + v8::Local ToBitmap(v8::Isolate* isolate); v8::Local GetNativeHandle( v8::Isolate* isolate, mate::Arguments* args);