Bug 425665 - RWT and SWT incompatible with regards to GC operations
Summary: RWT and SWT incompatible with regards to GC operations
Status: NEW
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-14 09:42 EST by Daniel Keck CLA
Modified: 2014-01-30 13:56 EST (History)
0 users

See Also:


Attachments
Problem visualization (508.54 KB, video/mp4)
2014-01-14 09:43 EST, Daniel Keck CLA
no flags Details
Requirement visualization (1.23 MB, video/mp4)
2014-01-14 09:44 EST, Daniel Keck CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Keck CLA 2014-01-14 09:42:03 EST
This thread is an extension of https://bugs.eclipse.org/bugs/show_bug.cgi?id=424141.

The task is quite easy simply fill a canvas inside a window with objects and don't care about them. If the window is resized or other windows being dragged over the "canvas window" forcing redraw and paintControl method to be executed and resulting in an inconsistent scene: Don't care, just continue filling the canvas.

I used the method in the thread linked above to create the two uploaded screencasts: SWT_RWT_GC_incompatible.mp4 and RWT_Patched_Version.mp4. I thought modifying GCOperationWriter will do the job but what I actually did was preventing the json array from being cleared. Leading in a stall at around 1000 operations. So I started patching the javascript client in a very naive way. You can see that in RWT_Patched_Version.mp4: After a resize the canvas will be scaled rather than resized but it showes the incompatibility: With the current implementation we will never be able to place more than 1000 individual objects on a canvas. The canvas example the RAP Team provided (http://rap.eclipsesource.com/rapdemo/examples#canvas) shows the same weakness: All objects being placed are kept inside a container. But this approach does not make sense if we dont care about the objects or if there are just too much and we simply want an object model to be visualized.

I think in the sense of single sourcing (SWT~RWT) it is important to adapt the behaviour to the one real SWT provides. Since there are probably applications that rely on the feature of an always cleared canvas-gc-scene it would be ideal to have a simple switch allowing the developer to use RWTs current behaviour and the one provided by SWT.

Kind regards
Daniel
Comment 1 Daniel Keck CLA 2014-01-14 09:43:07 EST
Created attachment 238967 [details]
Problem visualization
Comment 2 Daniel Keck CLA 2014-01-14 09:44:27 EST
Created attachment 238968 [details]
Requirement visualization
Comment 3 Daniel Keck CLA 2014-01-14 10:16:48 EST
The RWT side example (browser) will fill both big rectangualar areas with colored rectangles and not as desired (see SWT side example (normal window)) the right one with black rectangles only. This is caused instantiating the GC outside the run method: https://bugs.eclipse.org/bugs/show_bug.cgi?id=424141#c1 (first comment).

In RWT_Patched_Version.mp4 after refreshing the browser you'll see the same behaviour as in the unpatched version: The browser is given time to get/set all size contraints.
Comment 4 Daniel Keck CLA 2014-01-30 13:56:05 EST
(In reply to Daniel Keck from comment #2)
> Created attachment 238968 [details]
> Requirement visualization

It seems only VLC Player will show the screencasts without errors. E.g. Quicktime will show only a green screen for almost the half of the video.