Is it possible to limit redrawing(rendering) zone inside the scene

I am searching for something like glScissor in openGl.
So I could draw a part of the whole scene(some rectangle(x,y,w,h)) instead of the complete view.

It is possible to redraw only a rect during the scene, but Cocos2d-html5 doesn’t support it.

When you have multi layers, you must decide which rect you need to redraw by yourself, and also decide which layers you need to update.
As the result, it can’t improve much in performance.

sample code:

 context.beginPath();
 context.arc(this._origin.x, this._origin.y, this._radius, (Math.PI / 180) * this._startAngle, (Math.PI / 180) * this._endAngle, false);
 context.lineTo(this._origin.x, this._origin.y);
 context.clip();
 context.closePath();

Thank you for reply, but
It does not work constantly because cocos refreshes canvas with it’s framerate. Is it possible to attach this code to the main loop of cocos renderer.

We added it before, but it was removed at last. Because there is not much improvement in performance.

Maybe you can view the history of github, and find out the version.