Refactor internal 'resize' to more apt 'pipeline'

Refactor 'composite' C to C++ 'operations'
This commit is contained in:
Lovell Fuller
2015-06-01 16:33:26 +01:00
parent e2c53b59ce
commit 36be0453dd
11 changed files with 265 additions and 273 deletions

View File

@@ -4,8 +4,8 @@
#include "nan.h"
#include "common.h"
#include "operations.h"
#include "utilities.h"
#include "composite.h"
using v8::Local;
using v8::Object;
@@ -13,13 +13,6 @@ using v8::Number;
using v8::String;
using v8::Boolean;
using sharp::DetermineImageType;
using sharp::ImageType;
using sharp::InitImage;
using sharp::HasAlpha;
using sharp::counterQueue;
using sharp::counterProcess;
/*
Get and set cache memory and item limits
*/
@@ -68,6 +61,9 @@ NAN_METHOD(concurrency) {
Get internal counters (queued tasks, processing tasks)
*/
NAN_METHOD(counters) {
using sharp::counterProcess;
using sharp::counterQueue;
NanScope();
Local<Object> counters = NanNew<Object>();
counters->Set(NanNew<String>("queue"), NanNew<Number>(counterQueue));
@@ -154,6 +150,12 @@ NAN_METHOD(format) {
between two images of the same dimensions and number of channels.
*/
NAN_METHOD(_maxColourDistance) {
using sharp::Premultiply;
using sharp::DetermineImageType;
using sharp::ImageType;
using sharp::InitImage;
using sharp::HasAlpha;
NanScope();
// Create "hook" VipsObject to hang image references from