mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00: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:
@@ -62,8 +62,6 @@ import android.graphics.Canvas;
|
||||
// shows up during screenshot testing. Note that checking one side is enough, since if one side
|
||||
// is infinite, all sides will be infinite, since we only set infinite for all sides at the
|
||||
// same time - conversely, if one side is finite, all sides will be finite.
|
||||
if (mNeedsClipping) {
|
||||
canvas.clipRect(mClipLeft, mClipTop, mClipRight, mClipBottom);
|
||||
}
|
||||
canvas.clipRect(mClipLeft, mClipTop, mClipRight, mClipBottom);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user