Recent

Author Topic: BGRABitmap / BGRAControls and OSX is it working?  (Read 19807 times)

circular

  • Hero Member
  • *****
  • Posts: 4409
    • Personal webpage
Re: BGRABitmap / BGRAControls and OSX is it working?
« Reply #15 on: July 31, 2016, 07:34:00 pm »
Thank's very much. Yes, well I am starting to use Git only for development, so that's easier for testing indeed.  :)

Ok I have pushed some other change on Git to display more information when the format error occurs (change in the unit BGRALCLBitmap).

Can you try it?
Conscience is the debugger of the mind

Josh

  • Hero Member
  • *****
  • Posts: 1373
Re: BGRABitmap / BGRAControls and OSX is it working?
« Reply #16 on: July 31, 2016, 07:37:45 pm »
Hi

I too am getting invalid raw image data, but only when I attempt to run an application.
If I load in an existing one, it is rendering ok. But error appears when running.

Josh

How easy would it be to create an test version on SVN, so that changes does not effect other users whilst testing.

Maybe called BGRABITMAP_OSX_DONOTUSE  or something similar, just so as not to break something for others until working version maintained.

Or maybe a dropbox type test version, that can be removed when testing finished.
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

esvignolo

  • Full Member
  • ***
  • Posts: 159
  • Using FPC in Windows, Linux, Macos
Re: BGRABitmap / BGRAControls and OSX is it working?
« Reply #17 on: July 31, 2016, 07:41:03 pm »
Here u go :) :)


MacBook-Air-de-Esteban:~ Esteban$ cd development/lazarus/components/lazpaint-code/
MacBook-Air-de-Esteban:lazpaint-code Esteban$ git pull
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://github.com/bgrabitmap/lazpaint
   7392f9d..118b2fe  master     -> origin/master
Updating 7392f9d..118b2fe
Fast-forward
 bgrabitmap/bgralclbitmap.pas | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
MacBook-Air-de-Esteban:lazpaint-code Esteban$ cd ..
MacBook-Air-de-Esteban:components Esteban$ cd bgra-controls-code/
MacBook-Air-de-Esteban:bgra-controls-code Esteban$ git pull
Already up-to-date.


Thank's very much. Yes, well I am starting to use Git only for development, so that's easier for testing indeed.  :)

Ok I have pushed some other change on Git to display more information when the format error occurs (change in the unit BGRALCLBitmap).

Can you try it?

circular

  • Hero Member
  • *****
  • Posts: 4409
    • Personal webpage
Re: BGRABitmap / BGRAControls and OSX is it working?
« Reply #18 on: July 31, 2016, 07:41:34 pm »
@josh: Yes, I think also it is better to make sure current version is working.

For now, I am just adding error messages and making changes that are not likely to break something, but if I want to try something that may break things, I will rather post some code on the thread instead for example.

@esvignolo: thanks great! I am going to study that.

Oh, the image descriptor is invalid in fact. Unless it is 24-bit stored in 32-bit.
« Last Edit: July 31, 2016, 07:43:20 pm by circular »
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4409
    • Personal webpage
Re: BGRABitmap / BGRAControls and OSX is it working?
« Reply #19 on: July 31, 2016, 07:52:40 pm »
Ok, I presume the format is ARGB but alpha is not used.

I have pushed some other change to handle that.

Does it work?

@josh: Oh I understand now what you're saying about breaking, because yes OSX on Git is temporarily broken. Well we're working on fixing it.  ;)

I am already happy to have people around to help. But yes indeed, we could try and organise differently, like by making a separate branch on Git. So people that are testing would clone from this branch and not the master branch.
« Last Edit: July 31, 2016, 08:01:56 pm by circular »
Conscience is the debugger of the mind

esvignolo

  • Full Member
  • ***
  • Posts: 159
  • Using FPC in Windows, Linux, Macos
Re: BGRABitmap / BGRAControls and OSX is it working?
« Reply #20 on: July 31, 2016, 08:02:33 pm »
Now, the =lazarus-ide work, but the components still have a issue. (u can see the caption is correct, but in the component isn't)


MacBook-Air-de-Esteban:lazpaint-code Esteban$ git pull
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://github.com/bgrabitmap/lazpaint
   118b2fe..6377dde  master     -> origin/master
Updating 118b2fe..6377dde
Fast-forward
 bgrabitmap/bgralclbitmap.pas | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)
MacBook-Air-de-Esteban:lazpaint-code Esteban$

Ok, I presume the format is ARGB but alpha is not used.

I have pushed some other change to handle that.

Does it work?

@josh: Oh I understand now what you're saying about breaking, because yes OSX on Git is temporarily broken. Well we're working on fixing it.  ;)

I am already happy to have people around to help. But yes indeed, we could try and organise differently, like by making a separate branch on Git.

circular

  • Hero Member
  • *****
  • Posts: 4409
    • Personal webpage
Re: BGRABitmap / BGRAControls and OSX is it working?
« Reply #21 on: July 31, 2016, 08:08:18 pm »
That's interesting.

Ok so to avoid problems for non testing users, I have commented {$DEFINE RENDER_TEXT_ON_TBITMAP} line at the top of in BGRAText.

When you pull that changes again, please uncomment it to be able to test. I hope that's clear enough.

So this bug is mysterious now. Hmm...
Conscience is the debugger of the mind

esvignolo

  • Full Member
  • ***
  • Posts: 159
  • Using FPC in Windows, Linux, Macos
Re: BGRABitmap / BGRAControls and OSX is it working?
« Reply #22 on: July 31, 2016, 08:14:44 pm »
Well, uncommented that line in the next test that you need to do.
I just have to tell and do the test first chance. :)

That's interesting.

Ok so to avoid problems for non testing users, I have commented {$DEFINE RENDER_TEXT_ON_TBITMAP} line at the top of in BGRAText.

When you pull that changes again, please uncomment it to be able to test. I hope that's clear enough.

So this bug is mysterious now. Hmm...

circular

  • Hero Member
  • *****
  • Posts: 4409
    • Personal webpage
Re: BGRABitmap / BGRAControls and OSX is it working?
« Reply #23 on: July 31, 2016, 08:16:21 pm »
Ok. I have fixed some bug in BGRALCLBitmap.

I hope this will fix the problem. Please try!  :)
Conscience is the debugger of the mind

esvignolo

  • Full Member
  • ***
  • Posts: 159
  • Using FPC in Windows, Linux, Macos
Re: BGRABitmap / BGRAControls and OSX is it working?
« Reply #24 on: July 31, 2016, 08:26:57 pm »
Circular u really have a Conscience, because u have a debugger in your mind!!!

Works!

Thanks!

I think u can uncomment the line in bgrabitmap/bgratext.pas :)

circular

  • Hero Member
  • *****
  • Posts: 4409
    • Personal webpage
Re: BGRABitmap / BGRAControls and OSX is it working?
« Reply #25 on: July 31, 2016, 08:31:24 pm »
Wonderful! Thanks so much for your help.  :)

I've uncommented the line. So I suppose it is not necessary anymore to use BGRA order with OSX?

josh can you confirm the changes work for you as well? Does it improve the speed?

« Last Edit: July 31, 2016, 08:34:34 pm by circular »
Conscience is the debugger of the mind

Josh

  • Hero Member
  • *****
  • Posts: 1373
Re: BGRABitmap / BGRAControls and OSX is it working?
« Reply #26 on: August 01, 2016, 10:26:03 am »
Hi Circular,

Apologies had a bit of a family emergency.

I have just test the Git version and things appear visually better, however when a simple app is run it is even much more slower. I have created a vid to demonstrate it. Please excuse the black mouse cursor blob; problem with screen capture s/w

https://drive.google.com/file/d/0B_p0sS481ChxV2JxX0lDY3E5anM/view

I will try witth latest trunk and patches later, and report back.
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

circular

  • Hero Member
  • *****
  • Posts: 4409
    • Personal webpage
Re: BGRABitmap / BGRAControls and OSX is it working?
« Reply #27 on: August 01, 2016, 11:57:08 am »
I don't understand, did you try with latest Git or not? You say you're not using latest trunk/patches.

In the video, it seems that it is taking time to compute the states of the buttons, and once it is done it is fast.

I am a bit puzzled about the trail under the mouse. Is it that if the component takes time to be drawn, instead the panel is drawn?

I am not sure if the problem is related to BGRAControls or the text rendering of BGRABitmap. Also, what is black square?

Have you compared using RGBA or BGRA pixel order (in bgrapixels.inc) and using RENDER_TEXT_ON_TBITMAP or not (in BGRAText)?
« Last Edit: August 01, 2016, 05:39:38 pm by circular »
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4409
    • Personal webpage
Re: BGRABitmap / BGRAControls and OSX is it working?
« Reply #28 on: August 01, 2016, 03:48:58 pm »
Here is a test project to test the speed of fonts. Can you give me the times on MacOS?
Conscience is the debugger of the mind

esvignolo

  • Full Member
  • ***
  • Posts: 159
  • Using FPC in Windows, Linux, Macos
Re: BGRABitmap / BGRAControls and OSX is it working?
« Reply #29 on: August 01, 2016, 04:14:07 pm »
I tested de github version in 3 differents scenarios and work faster (than svn version), and work well. Maybe @josh u must try in another osx. (u say u have another mac)

 
regards :)

I don't understand, did you try with latest Git or not? You say you're not using latest trunk/patches.

In the video, it seems that it is taking time to compute the states of the buttons, and once it is done it is fast.

I am a bit puzzled about the trail under the mouse. Is it that if the component takes time to be drawn, instead the panel is drawn?

I am not sure if the problem is related to BGRAControls or the text rendering of BGRABitmap. Also, what is black square?

Have you compared using RGBA or BGRA pixel order (in bgrapixels.inc) and using RENDER_TEXT_ON_TBITMAP or not (in BGRALCLBitmap)?

 

TinyPortal © 2005-2018