Commit 59f7d72b authored by PhoeniX's avatar PhoeniX

SVG URL loader / parser refactoring

parent ebbd7f00
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
if (!lq) { if (!lq) {
lq = [NSOperationQueue new]; lq = [NSOperationQueue new];
lq.name = @"pxSVG Load queue"; lq.name = @"pxSVG Load queue";
[lq setMaxConcurrentOperationCount:1]; [lq setMaxConcurrentOperationCount:10];
} }
return lq; return lq;
} }
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
if (!pq) { if (!pq) {
pq = [NSOperationQueue new]; pq = [NSOperationQueue new];
pq.name = @"pxSVG Parser queue"; pq.name = @"pxSVG Parser queue";
[pq setMaxConcurrentOperationCount:1]; [pq setMaxConcurrentOperationCount:10];
} }
return pq; return pq;
} }
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
{ {
[self clean]; [self clean];
__weak pxSVGLayer *weakself = self; __weak pxSVGLayer *weakself = self;
NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{ __block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
NSURLResponse *resp; NSURLResponse *resp;
NSError *err; NSError *err;
NSData *data; NSData *data;
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
{ {
[self clean]; [self clean];
__weak pxSVGLayer *weakself = self; __weak pxSVGLayer *weakself = self;
NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{ __block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
pxSVGImage *img = [pxSVGImage svgImageWithXML:string]; pxSVGImage *img = [pxSVGImage svgImageWithXML:string];
if ([op isCancelled]) return; if ([op isCancelled]) return;
NSBlockOperation *sync = [NSBlockOperation blockOperationWithBlock:^{ NSBlockOperation *sync = [NSBlockOperation blockOperationWithBlock:^{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment