11 messages in net.java.dev.jna.usersRe: [jna-users] Re: shaped windows us...
FromSent OnAttachments
Timothy WallMay 24, 2007 7:12 am 
Christopher DeckersMay 29, 2007 2:21 am 
Christopher DeckersMay 29, 2007 3:29 am 
Wayne MeissnerMay 29, 2007 3:53 am 
Christopher DeckersMay 29, 2007 7:10 am 
Wayne MeissnerMay 29, 2007 7:43 am 
Timothy WallMay 29, 2007 11:04 am 
Olivier ChafikMay 29, 2007 6:19 pm 
Christopher DeckersMay 29, 2007 11:56 pm 
Timothy WallMay 30, 2007 5:19 am 
Christopher DeckersMay 30, 2007 6:10 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Re: shaped windows using images - performanceActions...
From:Timothy Wall (twal@dev.java.net)
Date:May 30, 2007 5:19:45 am
List:net.java.dev.jna.users

On May 30, 2007, at 2:56 AM, Christopher Deckers wrote:

Hi,

Please tell me if this new code works for you (I did very little testing), and... have fun !

There are a few issues with the new code, and I replied to Olivier directly to avoid spamming the list. I guess if we come up with a fixed version we will say so on that list.

Feel free to use the dev list so that the discussion is archived.

I assumed the example was a complete implementation of the feature. Moreover, when I talked about transparency with some other developers, they also pointed out JNA. I believe having good examples is a way for people to experiment JNA and consider its quality. If the alpha transparency is slow, they may think it is because of JNA rather than because of the examples itself. That is why I think there should be somewhere a complete optimized version of the transparency using JNA. What do you think?

The window masking, transparency, and alpha probably belong in their own project, but for the moment they live with JNA. I have no problem putting a fully optimized version into WindowUtils, but that doesn't mean that the first optimization that shows up on the list is going to get rolled into the code.

As an example, the code needs to be clear and easy to understand. As a "feature", it needs to be robust and efficient enough for its purpose. If we double the complexity of the example for a 10% increase in performance, that's not worth it. Olivier's solution is one I considered (and I'm glad he did it), but since it wasn't likely to affect performance for complex masks, I didn't want to spend time to implement it. Fundamentally I think it'd be faster overall if you could create the window region entirely in Java, then pass the formatted data in one pass to the w32 API (same goes for X11); that just takes a little more depth of w32 understanding than I've got, but I'm sure someone else out there could come up with a better solution more quickly than I could, and when you do, we'll get it tested and rolled in to WindowUtils. Before it gets included, though, we need before/after benchmarks with concrete test cases; it's very easy to chase down a ghost bottleneck.

Let me know if you'd like developer status if you want to spin your own branch and make sure your dev history gets tracked in SVN.