 
 /* Code for drawing the urlbar curve */
 private class CurveView: UIView {
+    private lazy var leftCurvePath: UIBezierPath = {
+        var leftArc = UIBezierPath(arcCenter: CGPoint(x: 5, y: 5), radius: CGFloat(5), startAngle: CGFloat(-M_PI), endAngle: CGFloat(-M_PI_2), clockwise: true)
+        leftArc.addLineToPoint(CGPoint(x: 0, y: 0))
+        leftArc.addLineToPoint(CGPoint(x: 0, y: 5))
+        leftArc.closePath()
+        return leftArc
+    }()
+
     override init(frame: CGRect) {
         super.init(frame: frame)
         commonInit()

            make.trailing.equalTo(self)
            make.width.height.equalTo(AppConstants.ToolbarHeight)
        }

        // Add an offset to the left for slide animation, and a bit of extra offset for spring bounces
        let leftOffset: CGFloat = self.tabsButton.frame.width + URLBarViewUX.URLBarCurveOffset + URLBarViewUX.URLBarCurveBounceBuffer
        self.curveShape.snp_remakeConstraints { make in
            make.edges.equalTo(self).offset(EdgeInsetsMake(0, -leftOffset, 0, URLBarViewUX.URLBarCurveBounceBuffer))
        }

        updateLayoutForEditing(editing: isEditing, animated: false)
        super.updateConstraints()
    }

        CGContextSaveGState(context)
        CGContextClearRect(context, rect)
        CGContextSetFillColorWithColor(context, URLBarViewUX.backgroundColorWithAlpha(1).CGColor)
        getPath().fill()
        leftCurvePath.fill()
        CGContextDrawPath(context, kCGPathFill)
        CGContextRestoreGState(context)
    }
