Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
packages_apps_Gallery2
Commits
062bd465
Commit
062bd465
authored
11 years ago
by
Nick Kralevich
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "jni: fix C99 inline linking"
parents
b269d503
2b996f62
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
jni/filters/geometry.c
jni/filters/geometry.c
+8
-8
No files found.
jni/filters/geometry.c
View file @
062bd465
...
...
@@ -17,7 +17,7 @@
#include "filters.h"
#include <stdio.h>
__inline__
void
flipVertical
(
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
){
static
__inline__
void
flipVertical
(
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
){
//Vertical
size_t
cpy_bytes
=
sizeof
(
char
)
*
4
;
int
width
=
cpy_bytes
*
srcWidth
;
...
...
@@ -31,7 +31,7 @@ __inline__ void flipVertical(char * source, int srcWidth, int srcHeight, char *
}
}
__inline__
void
flipHorizontal
(
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
){
static
__inline__
void
flipHorizontal
(
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
){
//Horizontal
size_t
cpy_bytes
=
sizeof
(
char
)
*
4
;
int
width
=
cpy_bytes
*
srcWidth
;
...
...
@@ -48,7 +48,7 @@ __inline__ void flipHorizontal(char * source, int srcWidth, int srcHeight, char
}
}
__inline__
void
flip_fun
(
int
flip
,
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
){
static
__inline__
void
flip_fun
(
int
flip
,
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
){
int
horiz
=
(
flip
&
1
)
!=
0
;
int
vert
=
(
flip
&
2
)
!=
0
;
if
(
horiz
&&
vert
){
...
...
@@ -70,7 +70,7 @@ __inline__ void flip_fun(int flip, char * source, int srcWidth, int srcHeight, c
}
//90 CCW (opposite of what's used in UI?)
__inline__
void
rotate90
(
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
){
static
__inline__
void
rotate90
(
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
){
size_t
cpy_bytes
=
sizeof
(
char
)
*
4
;
int
width
=
cpy_bytes
*
srcWidth
;
int
length
=
srcHeight
;
...
...
@@ -86,17 +86,17 @@ __inline__ void rotate90(char * source, int srcWidth, int srcHeight, char * dest
}
}
__inline__
void
rotate180
(
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
){
static
__inline__
void
rotate180
(
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
){
flip_fun
(
3
,
source
,
srcWidth
,
srcHeight
,
destination
,
dstWidth
,
dstHeight
);
}
__inline__
void
rotate270
(
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
){
static
__inline__
void
rotate270
(
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
){
rotate90
(
source
,
srcWidth
,
srcHeight
,
destination
,
dstWidth
,
dstHeight
);
flip_fun
(
3
,
destination
,
dstWidth
,
dstHeight
,
destination
,
dstWidth
,
dstHeight
);
}
// rotate == 1 is 90 degrees, 2 is 180, 3 is 270 (positive is CCW).
__inline__
void
rotate_fun
(
int
rotate
,
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
){
static
__inline__
void
rotate_fun
(
int
rotate
,
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
){
switch
(
rotate
)
{
case
1
:
...
...
@@ -113,7 +113,7 @@ __inline__ void rotate_fun(int rotate, char * source, int srcWidth, int srcHeigh
}
}
__inline__
void
crop
(
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
,
int
offsetWidth
,
int
offsetHeight
){
static
__inline__
void
crop
(
char
*
source
,
int
srcWidth
,
int
srcHeight
,
char
*
destination
,
int
dstWidth
,
int
dstHeight
,
int
offsetWidth
,
int
offsetHeight
){
size_t
cpy_bytes
=
sizeof
(
char
)
*
4
;
int
row_width
=
cpy_bytes
*
srcWidth
;
int
new_row_width
=
cpy_bytes
*
dstWidth
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment