Browse Source

Merge remote-tracking branch 'upstream/master' into memleakspull

v1.x
King Koopa 11 years ago
parent
commit
134d787a85
  1. 12
      History.md
  2. 2
      Readme.md
  3. 2
      binding.gyp
  4. 4
      package.json
  5. 8
      src/Canvas.cc
  6. 2
      src/CanvasPattern.cc
  7. 2
      src/init.cc
  8. 8
      util/has_lib.sh

12
History.md

@ -1,3 +1,15 @@
1.1.2 / 2013-10-31
==================
* NAN dep upgrade, full node@<=0.11.8 compatibility
* Use node::MakeCallback() instead of v8::Function::Call()
* Improve nan location discovery
* Fix enabling gif/jpeg options on Ubuntu 13.04
1.1.1 / 2013-10-09
==================
* add better support for outdated versions of Cairo
1.1.0 / 2013-08-01
==================

2
Readme.md

@ -109,7 +109,7 @@ _Note: At the moment, `jpegStream()` is the same as `syncJPEGStream()`, both
are synchronous_
```javascript
var stream = canvas.JPEGStream({
var stream = canvas.jpegStream({
bufsize: 4096 // output buffer size in bytes, default: 4096
, quality: 75 // JPEG quality (0-100) default: 75
, progressive: false // true for progressive compression, default: false

2
binding.gyp

@ -21,7 +21,7 @@
'targets': [
{
'target_name': 'canvas',
'include_dirs': ["<!(node -p -e \"require('path').dirname(require.resolve('nan'))\")"],
'include_dirs': ["<!(node -p -e \"require('path').relative('.', require('path').dirname(require.resolve('nan')))\")"],
'sources': [
'src/Canvas.cc',
'src/CanvasGradient.cc',

4
package.json

@ -1,6 +1,6 @@
{ "name": "canvas"
, "description": "Canvas graphics API backed by Cairo"
, "version": "1.1.0"
, "version": "1.1.2"
, "author": "TJ Holowaychuk <tj@learnboost.com>"
, "keywords": ["canvas", "graphic", "graphics", "pixman", "cairo", "image", "images", "pdf"]
, "homepage": "https://github.com/learnboost/node-canvas"
@ -9,7 +9,7 @@
"test": "make test"
}
, "dependencies": {
"nan": "~0.3.0"
"nan": "~0.4.1"
}
, "devDependencies": {
"express": "3.0"

8
src/Canvas.cc

@ -277,7 +277,7 @@ NAN_METHOD(Canvas::ToBuffer) {
if (!args[2]->StrictEquals(Undefined())) {
if (args[2]->IsUint32()) {
filter = args[1]->Uint32Value();
filter = args[2]->Uint32Value();
} else {
return NanThrowTypeError("Invalid filter value.");
}
@ -351,7 +351,7 @@ streamPNG(void *c, const uint8_t *data, unsigned len) {
Local<Value>::New(Null())
, buf
, Integer::New(len) };
closure->fn->Call(Context::GetCurrent()->Global(), 3, argv);
MakeCallback(Context::GetCurrent()->Global(), closure->fn, 3, argv);
return CAIRO_STATUS_SUCCESS;
}
@ -420,13 +420,13 @@ NAN_METHOD(Canvas::StreamPNGSync) {
NanReturnValue(try_catch.ReThrow());
} else if (status) {
Local<Value> argv[1] = { Canvas::Error(status) };
closure.fn->Call(Context::GetCurrent()->Global(), 1, argv);
MakeCallback(Context::GetCurrent()->Global(), closure.fn, 1, argv);
} else {
Local<Value> argv[3] = {
Local<Value>::New(Null())
, Local<Value>::New(Null())
, Integer::New(0) };
closure.fn->Call(Context::GetCurrent()->Global(), 3, argv);
MakeCallback(Context::GetCurrent()->Global(), closure.fn, 3, argv);
}
NanReturnUndefined();
}

2
src/CanvasPattern.cc

@ -17,7 +17,7 @@ Persistent<FunctionTemplate> Pattern::constructor;
void
Pattern::Initialize(Handle<Object> target) {
HandleScope scope;
NanScope();
// Constructor
Local<FunctionTemplate> ctor = FunctionTemplate::New(Pattern::New);

2
src/init.cc

@ -20,7 +20,7 @@
extern "C" void
init (Handle<Object> target) {
HandleScope scope;
NanScope();
Canvas::Initialize(target);
Image::Initialize(target);
ImageData::Initialize(target);

8
util/has_lib.sh

@ -1,14 +1,18 @@
#!/usr/bin/env bash
has_lib() {
local regex="lib$1.+(so|dylib)$"
local regex="lib$1.+(so|dylib)"
# Add /sbin to path as ldconfig is located there on some systems - e.g. Debian
# (and it still can be used by unprivileged users):
PATH="$PATH:/sbin"
export PATH
# Try using ldconfig on linux systems
for LINE in `which ldconfig > /dev/null && ldconfig -p 2>/dev/null | grep -E $regex`; do
return 0
done
# Try just checking common library locations
for dir in /lib /usr/lib /usr/local/lib /opt/local/lib; do
for dir in /lib /usr/lib /usr/local/lib /opt/local/lib /usr/lib/x86_64-linux-gnu /usr/lib/i386-linux-gnu; do
test -d $dir && ls $dir | grep -E $regex && return 0
done

Loading…
Cancel
Save