4bbb80e31a
This change takes polygon from 126k pixels per second fill to 240k pps fill on a reference 5 point star 50x66px polygon, updating both location and shape at 10hz. Tested on an m4 express feather. As a curiosity, the flat-out fill rate of a shape whose get_pixel is `return 0;` fills just shy of 375k pixels per second.
18 lines
430 B
C
18 lines
430 B
C
#ifndef MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_POLYGON_H
|
|
#define MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_POLYGON_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "py/obj.h"
|
|
#include "shared-module/vectorio/__init__.h"
|
|
|
|
typedef struct {
|
|
mp_obj_base_t base;
|
|
// An int array[ x, y, ... ]
|
|
int *points_list;
|
|
size_t len;
|
|
vectorio_event_t on_dirty;
|
|
} vectorio_polygon_t;
|
|
|
|
#endif // MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_POLYGON_H
|