Browse Source

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

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

26
History.md

@ -1,30 +1,42 @@
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
1.1.0 / 2013-08-01
==================
* add png compression options
* add jpeg stream progressive mode option
* add png compression options
* add jpeg stream progressive mode option
* fix resource leaks on read errors
1.0.4 / 2013-07-23
1.0.4 / 2013-07-23
==================
* 0.11.4+ compatibility using NAN
* fix typo in context2d for imageSmoothingEnabled
1.0.3 / 2013-06-04
1.0.3 / 2013-06-04
==================
* add "nearest" and "bilinear" to patternQuality
* fix fread() retval check (items not bytes)
* removed unneeded private fields
1.0.2 / 2013-03-22
1.0.2 / 2013-03-22
==================
* add Context2d#imageSmoothingEnabled=
1.0.1 / 2013-02-25
1.0.1 / 2013-02-25
==================
* travis: test modern node versions

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"

6
src/Canvas.cc

@ -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);

2
util/has_lib.sh

@ -1,6 +1,6 @@
#!/usr/bin/env bash
has_lib() {
local regex="lib$1.+(so|dylib)$"
local regex="lib$1.+(so|dylib)"
# Try using ldconfig on linux systems
for LINE in `which ldconfig > /dev/null && ldconfig -p 2>/dev/null | grep -E $regex`; do

Loading…
Cancel
Save