mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-03 22:48:25 +08:00
Don't save matrix when using canvas.save
Summary: Canvas.save by default saves both the matrix (for translations, scaling, etc) and the clip (clipRect) - in most of our cases, we really only care to save and restore the clip, not the matrix. Reviewed By: sriramramani Differential Revision: D3235698
This commit is contained in:
@@ -22,7 +22,7 @@ import android.graphics.Canvas;
|
||||
@Override
|
||||
public void draw(FlatViewGroup parent, Canvas canvas) {
|
||||
if (mNeedsClipping) {
|
||||
canvas.save();
|
||||
canvas.save(Canvas.CLIP_SAVE_FLAG);
|
||||
applyClipping(canvas);
|
||||
parent.drawNextChild(canvas);
|
||||
canvas.restore();
|
||||
|
||||
Reference in New Issue
Block a user