Re: RFR: 8271398: GTK3 drag view image swaps red and blue color channels [v3]

2021-09-17 Thread Kevin Rushforth
On Tue, 17 Aug 2021 13:12:41 GMT, Pankaj Bansal  wrote:

>> Thiago Milczarek Sayao has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Change test to manual
>
> The fix works fine and the test passes on all platforms. I have given minor 
> comments about the test.

@pankaj-bansal can you re-review this?

-

PR: https://git.openjdk.java.net/jfx/pull/599


Re: RFR: 8271398: GTK3 drag view image swaps red and blue color channels [v3]

2021-08-20 Thread Thiago Milczarek Sayao
On Tue, 17 Aug 2021 13:10:53 GMT, Pankaj Bansal  wrote:

>> Thiago Milczarek Sayao has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Change test to manual
>
> tests/manual/dnd/DndTestDragViewRawImage.java line 59:
> 
>> 57: });
>> 58: 
>> 59: Label label = new Label("Drag image should match source colors 
>> when dragged");
> 
> Could you please make the instructions a bit more clear?

I tried :)

-

PR: https://git.openjdk.java.net/jfx/pull/599


Re: RFR: 8271398: GTK3 drag view image swaps red and blue color channels [v3]

2021-08-17 Thread Pankaj Bansal
On Sun, 15 Aug 2021 21:18:51 GMT, Thiago Milczarek Sayao  
wrote:

>> It seems raw images need to be converted BRGA -> RGBA.
>> 
>> It was being converted on gtk2 code path, but gtk3 only uses 
>> `gtk_drag_set_icon_pixbuf`.
>> 
>> I have simplified the gtk2 `DragView::View::expose` to paint with 
>> `gdk_cairo_set_source_pixbuf` (that is available since Gtk 2.8) because the 
>> old way was somehow converting  again.
>> 
>> Run the issue sample with `-Djdk.gtk.version=2` to test the gtk2 code path.
>> 
>> To test:
>> 
>> `./gradlew apps`
>> 
>> 
>> java @build/run.args -cp apps/toys/DragDrop/dist/DragDrop.jar 
>> dragdrop.DragDropWithControls
>> java @build/run.args -cp apps/toys/DragDrop/dist/DragDrop.jar 
>> dragdrop.DragDropColor 
>> 
>> java -Djdk.gtk.version=2 @build/run.args -cp 
>> apps/toys/DragDrop/dist/DragDrop.jar dragdrop.DragDropWithControls
>> java -Djdk.gtk.version=2 @build/run.args -cp 
>> apps/toys/DragDrop/dist/DragDrop.jar dragdrop.DragDropColor
>
> Thiago Milczarek Sayao has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Change test to manual

The fix works fine and the test passes on all platforms. I have given minor 
comments about the test.

tests/manual/dnd/DndTestDragViewRawImage.java line 59:

> 57: });
> 58: 
> 59: Label label = new Label("Drag image should match source colors 
> when dragged");

Could you please make the instructions a bit more clear?

tests/manual/dnd/DndTestDragViewRawImage.java line 83:

> 81: return SwingFXUtils.toFXImage(image, null);
> 82: }
> 83: }

There is no newline at the file end

-

PR: https://git.openjdk.java.net/jfx/pull/599


Re: RFR: 8271398: GTK3 drag view image swaps red and blue color channels [v3]

2021-08-15 Thread Thiago Milczarek Sayao
On Sun, 15 Aug 2021 21:18:51 GMT, Thiago Milczarek Sayao  
wrote:

>> It seems raw images need to be converted BRGA -> RGBA.
>> 
>> It was being converted on gtk2 code path, but gtk3 only uses 
>> `gtk_drag_set_icon_pixbuf`.
>> 
>> I have simplified the gtk2 `DragView::View::expose` to paint with 
>> `gdk_cairo_set_source_pixbuf` (that is available since Gtk 2.8) because the 
>> old way was somehow converting  again.
>> 
>> Run the issue sample with `-Djdk.gtk.version=2` to test the gtk2 code path.
>> 
>> To test:
>> 
>> `./gradlew apps`
>> 
>> 
>> java @build/run.args -cp apps/toys/DragDrop/dist/DragDrop.jar 
>> dragdrop.DragDropWithControls
>> java @build/run.args -cp apps/toys/DragDrop/dist/DragDrop.jar 
>> dragdrop.DragDropColor 
>> 
>> java -Djdk.gtk.version=2 @build/run.args -cp 
>> apps/toys/DragDrop/dist/DragDrop.jar dragdrop.DragDropWithControls
>> java -Djdk.gtk.version=2 @build/run.args -cp 
>> apps/toys/DragDrop/dist/DragDrop.jar dragdrop.DragDropColor
>
> Thiago Milczarek Sayao has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Change test to manual

`gdk_cairo_set_source_pixbuf` is available since gtk 2.8. I can't find the 
minimum gtk version for 2.0.

-

PR: https://git.openjdk.java.net/jfx/pull/599


Re: RFR: 8271398: GTK3 drag view image swaps red and blue color channels [v3]

2021-08-15 Thread Thiago Milczarek Sayao
> It seems raw images need to be converted BRGA -> RGBA.
> 
> It was being converted on gtk2 code path, but gtk3 only uses 
> `gtk_drag_set_icon_pixbuf`.
> 
> I have simplified the gtk2 `DragView::View::expose` to paint with 
> `gdk_cairo_set_source_pixbuf` (that is available since Gtk 2.8) because the 
> old way was somehow converting  again.
> 
> Run the issue sample with `-Djdk.gtk.version=2` to test the gtk2 code path.
> 
> To test:
> 
> `./gradlew apps`
> 
> 
> java @build/run.args -cp apps/toys/DragDrop/dist/DragDrop.jar 
> dragdrop.DragDropWithControls
> java @build/run.args -cp apps/toys/DragDrop/dist/DragDrop.jar 
> dragdrop.DragDropColor 
> 
> java -Djdk.gtk.version=2 @build/run.args -cp 
> apps/toys/DragDrop/dist/DragDrop.jar dragdrop.DragDropWithControls
> java -Djdk.gtk.version=2 @build/run.args -cp 
> apps/toys/DragDrop/dist/DragDrop.jar dragdrop.DragDropColor

Thiago Milczarek Sayao has updated the pull request incrementally with one 
additional commit since the last revision:

  Change test to manual

-

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/599/files
  - new: https://git.openjdk.java.net/jfx/pull/599/files/5530488c..4509462a

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jfx=599=02
 - incr: https://webrevs.openjdk.java.net/?repo=jfx=599=01-02

  Stats: 254 lines in 2 files changed: 83 ins; 171 del; 0 mod
  Patch: https://git.openjdk.java.net/jfx/pull/599.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/599/head:pull/599

PR: https://git.openjdk.java.net/jfx/pull/599