It is currently Wed Jul 06, 2011 8:17 pm

All times are UTC - 8 hours




 Page 1 of 1 [ 6 posts ] 
Author Message
 Post subject: Optimisations
PostPosted: Fri Mar 25, 2011 2:59 am 

Joined: Thu Mar 24, 2011 11:58 am
Posts: 8
Location: France and Belgium
Hi,

I don't have an Inpulse watch yet but i'm going to start with the simulator, and i have a question regarding the SDK on the real hardware.

Is pulse_draw_image faster than pulse_draw_point24 for drawing the same image?
If yes, it is possible to build an PulseResource in RAM (if it does fit of course) to be passed to pulse_draw_image?

Thanks,
Tobé


Offline
 Profile  
 
 Post subject: Re: Optimisations
PostPosted: Fri Mar 25, 2011 4:34 pm 

Joined: Tue Feb 15, 2011 10:35 pm
Posts: 42
tobe wrote:
Is pulse_draw_image faster than pulse_draw_point24 for drawing the same image?

No it isn't, keep in mind that pulse_draw_image also has to decode the data. I ran a speed test and it seems that drawing an image with pulse_draw_point24 is about 2-3 times faster than using pulse_draw_image.


Offline
 Profile  
 
 Post subject: Re: Optimisations
PostPosted: Sat Mar 26, 2011 12:00 am 

Joined: Thu Mar 24, 2011 11:58 am
Posts: 8
Location: France and Belgium
Hello,

That's interresting, i was thinking about some packed bitmap formats such as greyscale/palettized and/or RLE encoded.

I have a suggestion for the SDK, do you think it's possible to add a function to skip a pixel ? It could be very handy for binary transparency.

Thanks,
Tobé


Offline
 Profile  
 
 Post subject: Re: Optimisations
PostPosted: Sat Mar 26, 2011 3:57 pm 

Joined: Tue Feb 15, 2011 10:35 pm
Posts: 42
tobe wrote:
do you think it's possible to add a function to skip a pixel ?

There's already a function in the SDK for that. Use pulse_draw_image_with_transparency(PulseResource image, uint8_t x, uint8_t y, color24_t transparent_color) where transparent_color is the color ignored when drawing the image.


Offline
 Profile  
 
 Post subject: Re: Optimisations
PostPosted: Sat Mar 26, 2011 5:28 pm 

Joined: Thu Mar 24, 2011 11:58 am
Posts: 8
Location: France and Belgium
I was thinking about something like pulse_skip_point24 to be used together with pulse_draw_point24.


Offline
 Profile  
 
 Post subject: Re: Optimisations
PostPosted: Mon Mar 28, 2011 8:24 pm 

Joined: Tue Feb 15, 2011 10:35 pm
Posts: 42
Unfortunately we can't implement such a function due to the nature of drawing to the oled. You'll have to create a new drawing window for each pixel or row/column of pixels that you want drawn.


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 6 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: