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 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkData.h" | 9 #include "SkData.h" |
10 #include "SkImage.h" | 10 #include "SkImage.h" |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 | 664 |
665 void sk_maskfilter_unref(sk_maskfilter_t* cfilter) { | 665 void sk_maskfilter_unref(sk_maskfilter_t* cfilter) { |
666 SkSafeUnref(AsMaskFilter(cfilter)); | 666 SkSafeUnref(AsMaskFilter(cfilter)); |
667 } | 667 } |
668 | 668 |
669 sk_maskfilter_t* sk_maskfilter_new_blur(sk_blurstyle_t cstyle, float sigma) { | 669 sk_maskfilter_t* sk_maskfilter_new_blur(sk_blurstyle_t cstyle, float sigma) { |
670 SkBlurStyle style; | 670 SkBlurStyle style; |
671 if (!find_blurstyle(cstyle, &style)) { | 671 if (!find_blurstyle(cstyle, &style)) { |
672 return NULL; | 672 return NULL; |
673 } | 673 } |
674 return ToMaskFilter(SkBlurMaskFilter::Create(style, sigma)); | 674 return ToMaskFilter(SkBlurMaskFilter::Make(style, sigma).release()); |
675 } | 675 } |
676 | 676 |
677 ////////////////////////////////////////////////////////////////////////////////
/////////// | 677 ////////////////////////////////////////////////////////////////////////////////
/////////// |
678 | 678 |
679 sk_data_t* sk_data_new_with_copy(const void* src, size_t length) { | 679 sk_data_t* sk_data_new_with_copy(const void* src, size_t length) { |
680 return ToData(SkData::MakeWithCopy(src, length).release()); | 680 return ToData(SkData::MakeWithCopy(src, length).release()); |
681 } | 681 } |
682 | 682 |
683 sk_data_t* sk_data_new_from_malloc(const void* memory, size_t length) { | 683 sk_data_t* sk_data_new_from_malloc(const void* memory, size_t length) { |
684 return ToData(SkData::MakeFromMalloc(memory, length).release()); | 684 return ToData(SkData::MakeFromMalloc(memory, length).release()); |
(...skipping 13 matching lines...) Expand all Loading... |
698 | 698 |
699 size_t sk_data_get_size(const sk_data_t* cdata) { | 699 size_t sk_data_get_size(const sk_data_t* cdata) { |
700 return AsData(cdata)->size(); | 700 return AsData(cdata)->size(); |
701 } | 701 } |
702 | 702 |
703 const void* sk_data_get_data(const sk_data_t* cdata) { | 703 const void* sk_data_get_data(const sk_data_t* cdata) { |
704 return AsData(cdata)->data(); | 704 return AsData(cdata)->data(); |
705 } | 705 } |
706 | 706 |
707 ////////////////////////////////////////////////////////////////////////////////
/////////// | 707 ////////////////////////////////////////////////////////////////////////////////
/////////// |
OLD | NEW |