Skip to content

Commit 9a7aedc

Browse files
committed
rename to match
1 parent 864f116 commit 9a7aedc

File tree

8 files changed

+74
-74
lines changed

8 files changed

+74
-74
lines changed

BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3091,7 +3091,7 @@ skiasharp_build("SkiaSharp") {
30913091
"src/xamarin/sk_compatpaint.cpp",
30923092
"src/xamarin/sk_manageddrawable.cpp",
30933093
"src/xamarin/sk_managedallocator.cpp",
3094-
"src/xamarin/sk_managed_pixel_ref.cpp",
3094+
"src/xamarin/sk_managedpixelref.cpp",
30953095
"src/xamarin/sk_managedstream.cpp",
30963096
"src/xamarin/sk_managedtracememorydump.cpp",
30973097
"src/xamarin/sk_xamarin.cpp",

include/c/sk_bitmap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ SK_C_API bool sk_bitmap_try_alloc_pixels(sk_bitmap_t* cbitmap, const sk_imageinf
4141
SK_C_API bool sk_bitmap_try_alloc_pixels_with_flags(sk_bitmap_t* cbitmap, const sk_imageinfo_t* requestedInfo, uint32_t flags);
4242
SK_C_API void sk_bitmap_set_pixels(sk_bitmap_t* cbitmap, void* pixels);
4343
SK_C_API bool sk_bitmap_peek_pixels(sk_bitmap_t* cbitmap, sk_pixmap_t* cpixmap);
44-
SK_C_API void* sk_bitmap_get_pixel_ref(sk_bitmap_t* cbitmap);
45-
SK_C_API void sk_bitmap_set_pixel_ref(sk_bitmap_t* cbitmap, void* cpixelref, int x, int y);
44+
SK_C_API void* sk_bitmap_get_pixelref(sk_bitmap_t* cbitmap);
45+
SK_C_API void sk_bitmap_set_pixelref(sk_bitmap_t* cbitmap, void* cpixelref, int x, int y);
4646
SK_C_API bool sk_bitmap_extract_subset(sk_bitmap_t* cbitmap, sk_bitmap_t* dst, sk_irect_t* subset);
4747
SK_C_API bool sk_bitmap_extract_alpha(sk_bitmap_t* cbitmap, sk_bitmap_t* dst, const sk_paint_t* paint, sk_ipoint_t* offset);
4848
SK_C_API void sk_bitmap_notify_pixels_changed(sk_bitmap_t* cbitmap);

include/c/sk_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ typedef struct sk_bitmapallocator_t sk_bitmapallocator_t;
347347
typedef struct sk_pixmap_t sk_pixmap_t;
348348
typedef struct sk_colorfilter_t sk_colorfilter_t;
349349
// placed here to help seperate in PR
350-
typedef struct sk_pixel_ref_t sk_pixel_ref_t;
350+
typedef struct sk_pixelref_t sk_pixelref_t;
351351
typedef struct sk_imagefilter_t sk_imagefilter_t;
352352
typedef struct sk_imagefilter_croprect_t sk_imagefilter_croprect_t;
353353

include/xamarin/sk_managed_pixel_ref.h

Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Copyright 2014 Google Inc.
3+
* Copyright 2015 Xamarin Inc.
4+
* Copyright 2017 Microsoft Corporation. All rights reserved.
5+
*
6+
* Use of this source code is governed by a BSD-style license that can be
7+
* found in the LICENSE file.
8+
*/
9+
10+
#ifndef sk_managedpixelref_DEFINED
11+
#define sk_managedpixelref_DEFINED
12+
13+
#include "sk_xamarin.h"
14+
15+
#include "include/c/sk_types.h"
16+
17+
SK_C_PLUS_PLUS_BEGIN_GUARD
18+
19+
typedef void (*sk_pixelref_destroy_proc)(sk_pixelref_t* d, void* context);
20+
21+
typedef struct {
22+
sk_pixelref_destroy_proc fDestroy;
23+
} sk_pixelref_procs_t;
24+
25+
SK_X_API sk_pixelref_t* sk_managedpixelref_new_from_existing(void* context, void* pixelRef);
26+
SK_X_API sk_pixelref_t* sk_managedpixelref_new(void* context, int32_t, int32_t, void*, size_t);
27+
SK_X_API void sk_managedpixelref_delete(sk_pixelref_t*);
28+
SK_X_API sk_isize_t sk_managedpixelref_dimensions(sk_pixelref_t*);
29+
SK_X_API int32_t sk_managedpixelref_width(sk_pixelref_t*);
30+
SK_X_API int32_t sk_managedpixelref_height(sk_pixelref_t*);
31+
SK_X_API size_t sk_managedpixelref_rowBytes(sk_pixelref_t*);
32+
SK_X_API void* sk_managedpixelref_pixels(sk_pixelref_t*);
33+
SK_X_API void* sk_managedpixelref_pixelref(sk_pixelref_t* d);
34+
SK_X_API uint32_t sk_managedpixelref_generation_id(sk_pixelref_t*);
35+
SK_X_API void sk_managedpixelref_notify_pixels_changed(sk_pixelref_t*);
36+
SK_X_API bool sk_managedpixelref_is_immutable(sk_pixelref_t*);
37+
SK_X_API void sk_managedpixelref_set_immutable(sk_pixelref_t*);
38+
//SK_X_API void sk_managedpixelref_add_generation_id_listener(sk_pixelref_t*, sk_id_change_listener_t*);
39+
SK_X_API void sk_managedpixelref_notify_added_to_cache(sk_pixelref_t*);
40+
SK_X_API void sk_managedpixelref_set_procs(sk_pixelref_procs_t procs);
41+
42+
SK_C_PLUS_PLUS_END_GUARD
43+
44+
#endif

src/c/sk_bitmap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ bool sk_bitmap_peek_pixels(sk_bitmap_t* cbitmap, sk_pixmap_t* cpixmap) {
138138
return AsBitmap(cbitmap)->peekPixels(AsPixmap(cpixmap));
139139
}
140140

141-
SK_C_API void* sk_bitmap_get_pixel_ref(sk_bitmap_t* cbitmap) {
141+
SK_C_API void* sk_bitmap_get_pixelref(sk_bitmap_t* cbitmap) {
142142
return AsBitmap(cbitmap)->pixelRef();
143143
}
144144

145-
SK_C_API void sk_bitmap_set_pixel_ref(sk_bitmap_t* cbitmap, void* cpixelref, int x, int y) {
145+
SK_C_API void sk_bitmap_set_pixelref(sk_bitmap_t* cbitmap, void* cpixelref, int x, int y) {
146146
SkPixelRef* r = (SkPixelRef*)cpixelref;
147147
AsBitmap(cbitmap)->setPixelRef(sk_ref_sp(r), x, y);
148148
}

src/xamarin/SkiaKeeper.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
#include "include/xamarin/sk_managedstream.h"
5555
// placed here to help seperate in PR
5656
#include "include/xamarin/sk_managedallocator.h"
57-
#include "include/xamarin/sk_managed_pixel_ref.h"
57+
#include "include/xamarin/sk_managedpixelref.h"
5858
#include "include/xamarin/sk_manageddrawable.h"
5959
#include "include/xamarin/sk_managedtracememorydump.h"
6060
#include "include/xamarin/sk_compatpaint.h"
@@ -112,8 +112,8 @@ void** KeepSkiaCSymbols (void)
112112
(void*)sk_managedstream_new,
113113
// placed here to help seperate in PR
114114
(void*)sk_managedallocator_new,
115-
(void*)sk_managed_pixel_ref_new,
116-
(void*)sk_managed_pixel_ref_new_from_existing,
115+
(void*)sk_managedpixelref_new,
116+
(void*)sk_managedpixelref_new_from_existing,
117117
(void*)sk_manageddrawable_new,
118118
(void*)sk_managedtracememorydump_new,
119119
};

src/xamarin/sk_managed_pixel_ref.cpp renamed to src/xamarin/sk_managedpixelref.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,83 +7,83 @@
77

88
#include "include/xamarin/SkManagedPixelRef.h"
99
#include "include/xamarin/SkManaged_ID_Change_Listener.h"
10-
#include "include/xamarin/sk_managed_pixel_ref.h"
10+
#include "include/xamarin/sk_managedpixelref.h"
1111
#include "src/c/sk_types_priv.h"
1212

13-
static inline SkManagedPixelRef* AsSkManagedPixelRef(sk_pixel_ref_t* d) {
13+
static inline SkManagedPixelRef* AsSkManagedPixelRef(sk_pixelref_t* d) {
1414
return reinterpret_cast<SkManagedPixelRef*>(d);
1515
}
16-
static inline sk_pixel_ref_t* ToSkPixelRef(SkManagedPixelRef* d) {
17-
return reinterpret_cast<sk_pixel_ref_t*>(d);
16+
static inline sk_pixelref_t* ToSkPixelRef(SkManagedPixelRef* d) {
17+
return reinterpret_cast<sk_pixelref_t*>(d);
1818
}
1919

2020
static inline SkManaged_ID_Change_Listener* AsSkManaged_ID_Change_Listener(sk_id_change_listener_t* d) {
2121
return reinterpret_cast<SkManaged_ID_Change_Listener*>(d);
2222
}
2323

24-
static sk_pixel_ref_procs_t gProcs;
24+
static sk_pixelref_procs_t gProcs;
2525

2626
void destroy(SkManagedPixelRef* d, void* context) {
2727
if (gProcs.fDestroy) {
2828
gProcs.fDestroy(ToSkPixelRef(d), context);
2929
}
3030
}
3131

32-
sk_pixel_ref_t* sk_managed_pixel_ref_new_from_existing(void* context, void* pixelRef) {
32+
sk_pixelref_t* sk_managedpixelref_new_from_existing(void* context, void* pixelRef) {
3333
return ToSkPixelRef(new SkManagedPixelRef(context, (SkPixelRef*)pixelRef));
3434
}
3535

36-
sk_pixel_ref_t* sk_managed_pixel_ref_new(
36+
sk_pixelref_t* sk_managedpixelref_new(
3737
void* context, int32_t width, int32_t height, void* addr, size_t rowBytes) {
3838
return ToSkPixelRef(new SkManagedPixelRef(context, width, height, addr, rowBytes));
3939
}
4040

41-
void sk_managed_pixel_ref_delete(sk_pixel_ref_t* d) {
41+
void sk_managedpixelref_delete(sk_pixelref_t* d) {
4242
delete AsSkManagedPixelRef(d);
4343
}
4444

45-
sk_isize_t sk_managed_pixel_ref_dimensions(sk_pixel_ref_t* d) {
45+
sk_isize_t sk_managedpixelref_dimensions(sk_pixelref_t* d) {
4646
return ToISize(AsSkManagedPixelRef(d)->pixelRef->dimensions());
4747
}
48-
int32_t sk_managed_pixel_ref_width(sk_pixel_ref_t* d) {
48+
int32_t sk_managedpixelref_width(sk_pixelref_t* d) {
4949
return AsSkManagedPixelRef(d)->pixelRef->width();
5050
}
5151

52-
int32_t sk_managed_pixel_ref_height(sk_pixel_ref_t* d) {
52+
int32_t sk_managedpixelref_height(sk_pixelref_t* d) {
5353
return AsSkManagedPixelRef(d)->pixelRef->height();
5454
}
55-
size_t sk_managed_pixel_ref_rowBytes(sk_pixel_ref_t* d) {
55+
size_t sk_managedpixelref_rowBytes(sk_pixelref_t* d) {
5656
return AsSkManagedPixelRef(d)->pixelRef->rowBytes();
5757
}
58-
void* sk_managed_pixel_ref_pixels(sk_pixel_ref_t* d) {
58+
void* sk_managedpixelref_pixels(sk_pixelref_t* d) {
5959
return AsSkManagedPixelRef(d)->pixelRef->pixels();
6060
}
61-
void* sk_managed_pixel_ref_pixel_ref(sk_pixel_ref_t* d) {
61+
void* sk_managedpixelref_pixelref(sk_pixelref_t* d) {
6262
// IMPORTANT!!!
6363
// we must keep our pixel ref in order to keep functioning
6464
// so we do not call release() nor unref() on it to prevent it pointing to garbage
6565
return AsSkManagedPixelRef(d)->pixelRef.get();
6666
}
67-
uint32_t sk_managed_pixel_ref_generation_id(sk_pixel_ref_t* d) {
67+
uint32_t sk_managedpixelref_generation_id(sk_pixelref_t* d) {
6868
return AsSkManagedPixelRef(d)->pixelRef->getGenerationID();
6969
}
70-
void sk_managed_pixel_ref_notify_pixels_changed(sk_pixel_ref_t* d) {
70+
void sk_managedpixelref_notify_pixels_changed(sk_pixelref_t* d) {
7171
AsSkManagedPixelRef(d)->pixelRef->notifyPixelsChanged();
7272
}
73-
bool sk_managed_pixel_ref_is_immutable(sk_pixel_ref_t* d) {
73+
bool sk_managedpixelref_is_immutable(sk_pixelref_t* d) {
7474
return AsSkManagedPixelRef(d)->pixelRef->isImmutable();
7575
}
76-
void sk_managed_pixel_ref_set_immutable(sk_pixel_ref_t* d) {
76+
void sk_managedpixelref_set_immutable(sk_pixelref_t* d) {
7777
AsSkManagedPixelRef(d)->pixelRef->setImmutable();
7878
}
79-
//void sk_managed_pixel_ref_add_generation_id_listener(sk_pixel_ref_t* d, sk_id_change_listener_t* listener) {
79+
//void sk_managedpixelref_add_generation_id_listener(sk_pixelref_t* d, sk_id_change_listener_t* listener) {
8080
// AsSkManagedPixelRef(d)->pixelRef->addGenIDChangeListener(sk_ref_sp(AsSkManaged_ID_Change_Listener(listener)));
8181
//}
82-
void sk_managed_pixel_ref_notify_added_to_cache(sk_pixel_ref_t* d) {
82+
void sk_managedpixelref_notify_added_to_cache(sk_pixelref_t* d) {
8383
AsSkManagedPixelRef(d)->pixelRef->notifyAddedToCache();
8484
}
8585

86-
void sk_managed_pixel_ref_set_procs(sk_pixel_ref_procs_t procs) {
86+
void sk_managedpixelref_set_procs(sk_pixelref_procs_t procs) {
8787
gProcs = procs;
8888

8989
SkManagedPixelRef::Procs p;

0 commit comments

Comments
 (0)