Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Optimizing DrawImage across platforms
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #53671 is a reply to message #53666] Mon, 20 April 2020 12:57 Go to previous messageGo to previous message
Tom1
Messages: 1303
Registered: March 2007
Ultimate Contributor
mirek wrote on Mon, 20 April 2020 11:31
Worth testing:

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

GUI_APP_MAIN
{
	DDUMP(GetDeviceCaps(GetDC(NULL), SHADEBLENDCAPS) & SB_PIXEL_ALPHA);
}


This should detect whether AlphaBlend is HW accelerated on the platform.... It is 0 on my computer with RX580...

It would also be interesting to test how SW emulation fares, simply by changing

	if(0 && fnAlphaBlend() && IsNull(c) && !ImageFallBack &&


In general, I think it might be a good idea to "reactivate" SetSurface, but maybe we can do that with some Image hinting system? I do not really like the idea of GetKind anymore, it is from old days when 1024x768 bitmap was considered huge...

gtk3: Have you tested:

static Size sz = Ctrl::GetPrimaryScreenArea().GetSize();

?

Mirek


Hi

1. DUMP gives me: GetDeviceCaps(GetDC(NULL), SHADEBLENDCAPS) & SB_PIXEL_ALPHA = 0

2. SW emulation (with "if(0 && ..." ) yields 28-31 milliseconds on a maximized 4k window.

3. On the Linux/GTK3 dept. "static Size sz = Ctrl::GetPrimaryScreenArea().GetSize();" does not work because first call yields zero size... The following calls return the monitor size. The initialization of "static Size sz" should be linked with a valid non-zero size returned.

Best regards,

Tom
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Rapsberry PI - cpu dilemma
Next Topic: U++ on Telegram
Goto Forum:
  


Current Time: Wed Jun 04 15:19:32 CEST 2025

Total time taken to generate the page: 0.13285 seconds