Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
e45035db
Commit
e45035db
authored
Jan 07, 2017
by
Oleg Korsak
Browse files
extmod/modframebuf: optimize fill_rect subroutine call
parent
65cadbeb
Changes
1
Hide whitespace changes
Inline
Side-by-side
extmod/modframebuf.c
View file @
e45035db
...
...
@@ -115,7 +115,7 @@ static inline uint32_t getpixel(const mp_obj_framebuf_t *fb, int x, int y) {
}
STATIC
void
fill_rect
(
const
mp_obj_framebuf_t
*
fb
,
int
x
,
int
y
,
int
w
,
int
h
,
uint32_t
col
)
{
if
(
x
+
w
<=
0
||
y
+
h
<=
0
||
y
>=
fb
->
height
||
x
>=
fb
->
width
)
{
if
(
h
<
1
||
w
<
1
||
x
+
w
<=
0
||
y
+
h
<=
0
||
y
>=
fb
->
height
||
x
>=
fb
->
width
)
{
// No operation needed.
return
;
}
...
...
Write
Preview
Supports
Markdown
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