Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: src/c/sk_surface.cpp

Issue 1779263003: Make sp variants for SkData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/effects/SkColorCubeFilter.h ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::Create(style, sigma));
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::NewWithCopy(src, length)); 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::NewFromMalloc(memory, length)); 684 return ToData(SkData::MakeFromMalloc(memory, length).release());
685 } 685 }
686 686
687 sk_data_t* sk_data_new_subset(const sk_data_t* csrc, size_t offset, size_t lengt h) { 687 sk_data_t* sk_data_new_subset(const sk_data_t* csrc, size_t offset, size_t lengt h) {
688 return ToData(SkData::NewSubset(AsData(csrc), offset, length)); 688 return ToData(SkData::MakeSubset(AsData(csrc), offset, length).release());
689 } 689 }
690 690
691 void sk_data_ref(const sk_data_t* cdata) { 691 void sk_data_ref(const sk_data_t* cdata) {
692 SkSafeRef(AsData(cdata)); 692 SkSafeRef(AsData(cdata));
693 } 693 }
694 694
695 void sk_data_unref(const sk_data_t* cdata) { 695 void sk_data_unref(const sk_data_t* cdata) {
696 SkSafeUnref(AsData(cdata)); 696 SkSafeUnref(AsData(cdata));
697 } 697 }
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 //////////////////////////////////////////////////////////////////////////////// ///////////
OLDNEW
« no previous file with comments | « include/effects/SkColorCubeFilter.h ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698