OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 // EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL | 8 // EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL |
9 // DO NOT USE -- FOR INTERNAL TESTING ONLY | 9 // DO NOT USE -- FOR INTERNAL TESTING ONLY |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 sk_surface_unref(surf); | 60 sk_surface_unref(surf); |
61 | 61 |
62 sk_canvas_draw_image(canvas, img0, W + 10, 10, NULL); | 62 sk_canvas_draw_image(canvas, img0, W + 10, 10, NULL); |
63 | 63 |
64 sk_data_t* data = sk_image_encode(img0); | 64 sk_data_t* data = sk_image_encode(img0); |
65 sk_image_unref(img0); | 65 sk_image_unref(img0); |
66 | 66 |
67 sk_image_t* img1 = sk_image_new_from_data(data); | 67 sk_image_t* img1 = sk_image_new_from_data(data); |
68 sk_data_unref(data); | 68 sk_data_unref(data); |
69 | 69 |
70 sk_canvas_draw_image(canvas, img1, W/2, H/2, NULL); | 70 if (img1) { |
scroggo
2014/12/30 11:14:33
Can we at least log something in this case? It see
| |
71 sk_image_unref(img1); | 71 sk_canvas_draw_image(canvas, img1, W/2, H/2, NULL); |
72 sk_image_unref(img1); | |
73 } | |
72 } | 74 } |
73 | 75 |
74 | 76 |
OLD | NEW |