The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Some Alpha Composition Observations

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Some Alpha Composition Observations Posted: Oct 6, 2008 11:42 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Some Alpha Composition Observations
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Travis Griggs - Blog

Advertisement

We're playing with some new icons for VisualWorks. And if you're going to do that, there's no sense doing so, unless you're going to support alpha blending.

So I spent Friday making tests for an AlphaCompositedImage pass. And then looked at some numbers today. My implementation was "clean room" inspired by the work Runar Jordahl did in the past.

In the case where the palettes can be matched, the composition can go quickly. On my VMWare hosted Vista, I can lay down 16x16 icons about 150 usecs a piece. This is actually pretty impressive for a language that doesn't bash bytes well. We keep the speed up there by reusing the backing buffer. So I'm getting about 70% of the time spent in display primitives. I don't know how the numbers will pan out for OSX or X11. They could vary quite a bit.

Anyone who knows me, knows I'd really like to do this with Cairo. Interestingly, Cairo ImageSurfaces using the HigherGlyphics package are about the exact same speed. So I'm relatively pleased with the VisualWorks numbers. Again, I wonder how the race would pan out on Linux or X11.

Where the race spreads out is when we go to larger graphics. Using a large 400x500 png, Cairo outstrips the all-in-Smalltalk implementation by about 5:1. And of course, Cairo can rotate those 16x16 icons at any angle, and the speed hit is barely noticable (about 5%).

Read: Some Alpha Composition Observations

Topic: BottomFeeder Cleanups Previous Topic   Next Topic Topic: Minimal Win32 Cairo and Pango Libraries

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use