make sure to init the clip operation
authorMatthew Leibowitz <mattleibow@live.com>
Fri, 13 May 2016 16:52:01 +0000 (18:52 +0200)
committerMatthew Leibowitz <mattleibow@live.com>
Fri, 13 May 2016 16:52:01 +0000 (18:52 +0200)
src/c/xamarin/sk_x_canvas.cpp

index f2b8a91..338316a 100644 (file)
@@ -119,7 +119,7 @@ void sk_canvas_draw_round_rect(sk_canvas_t* ccanvas, const sk_rect_t* crect, flo
 }
 
 void sk_canvas_clip_rect_with_operation(sk_canvas_t* ccanvas, const sk_rect_t* crect, sk_region_op_t op, bool doAA) {
-    SkRegion::Op operation;
+    SkRegion::Op operation = SkRegion::kIntersect_Op;
     if (op) {
         find_sk(op, &operation);
     }
@@ -127,7 +127,7 @@ void sk_canvas_clip_rect_with_operation(sk_canvas_t* ccanvas, const sk_rect_t* c
 }
 
 void sk_canvas_clip_path_with_operation(sk_canvas_t* ccanvas, const sk_path_t* cpath, sk_region_op_t op, bool doAA) {
-    SkRegion::Op operation;
+    SkRegion::Op operation = SkRegion::kIntersect_Op;
     if (op) {
         find_sk(op, &operation);
     }