Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

CanvasRenderingContext2D.drawImage is so slow in a clipping region

$
0
0

This is my code

context.save();
context.beginPath();

//loop
clearRect(x,y,width,height);
context.rect(x,y,width,height);
//loop end
context.clip();

//loop
context.drawImage(........)
//loop end

context.restore();

The drawImage method is very fast if there is no clipping area. But the fps is drop to 10% if there are clipping regions.

Any workaround?


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>