Flickering issue

Having problems with building or using the CefGlue .NET/Mono binding? Ask your questions here.

Moderator: fddima

Flickering issue

Postby Gagan » Wed May 08, 2013 3:26 am

Hi,

Upon executing the CEFGlue application (demo project), when we try to expand the window size (either by resizing using mouse or maximizing the window), there's a flicker which occurs between the browserControl and the Grid.
Is there any way to fix this issue?

Thanks!
P.S. Upon checking the same with the C++ version of the demo project, the above issue does not come up.
Gagan
Newbie
 
Posts: 7
Joined: Wed May 08, 2013 3:15 am

Re: Flickering issue

Postby fddima » Wed May 08, 2013 11:40 am

What kind of flickering you mean?
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Flickering issue

Postby Gagan » Thu May 09, 2013 12:04 am

Hi,

By flickering, I am referring to the intermediate screen becoming black. Detailed explanation:
Say I execute the application and the WPFCefBrowser gets displayed in a window (This window is not maximized by default). Now when I am stretching the window either horizontally or vertically or both by either pulling its edge or corner, then the screen area enclosed between that window edge and the grid (which contains the browser) becomes black. Similarly, the intermediate screen turns black even when this window is maximized.

I hope I am clear this time. Kindly let me know in case of any more clarifications.

Thanks!
Gagan
Newbie
 
Posts: 7
Joined: Wed May 08, 2013 3:15 am

Re: Flickering issue

Postby fddima » Thu May 09, 2013 6:02 am

I'm not sure that i'm definitely understand correctly. You mean, some delay before actual window's content's will redraws, when you sizing window? For example if you resizing window by mouse and extending it - it show's black rectangles on right/bottom sides? And after maximizing it have about 0.3-0.5 sec delay, before underlying browser resized?
Some delay in page layout it is normal. Black rectangles depends from WPF's control implementation, it just sample and can be improved.
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Flickering issue

Postby Gagan » Thu May 09, 2013 8:28 am

Hi, the understanding is correct. We tried a lot to overcome the issue. For eg. by changing the frame/window etc color to transparent but the result was the same.
Also, we could not identify if CefBrowser exposes any property which allows us to solve this problem. Would request you to kindly help us regarding this.

Thanks!
Gagan
Newbie
 
Posts: 7
Joined: Wed May 08, 2013 3:15 am

Re: Flickering issue

Postby fddima » Thu May 09, 2013 9:26 am

Gagan wrote:Hi, the understanding is correct. We tried a lot to overcome the issue. For eg. by changing the frame/window etc color to transparent but the result was the same.
Also, we could not identify if CefBrowser exposes any property which allows us to solve this problem. Would request you to kindly help us regarding this.
Thanks!

You can try fill it up with other color when creates new WriteableBitmap in WpfCefBrowser.cs file (look in HandleViewPaint method).

Or may be have sense assigning new bitmap to _browserPageImage.Source after it will be actually filled up (i.e. make something like double-buffering), but it is also will be not a clear.

In general this WPF control needed to be entirely rewritten due to many issues, it was be just an OSR sample test using WPF.
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Flickering issue

Postby Gagan » Fri May 10, 2013 1:02 am

Hi,

We tried the suggested idea. But the issue persisted.
The code we used in the method "HandleViewPaint" was:

List<System.Windows.Media.Color> colors = new List<System.Windows.Media.Color>();
colors.Add(System.Windows.Media.Colors.Red);
BitmapPalette myPalette = new BitmapPalette(colors);

Now we are supplying "myPalette" as the last parameter while calling new WriteableBitmap(...).

We hopfully expected it would show us the red color rectangles, instead of black :shock: but didn't get the desired results.
Any more insights?

Thanks!
Gagan
Newbie
 
Posts: 7
Joined: Wed May 08, 2013 3:15 am

Re: Flickering issue

Postby fddima » Fri May 10, 2013 9:31 am

Hi.

What about:
Or may be have sense assigning new bitmap to _browserPageImage.Source after it will be actually filled up (i.e. make something like double-buffering), but it is also will be not a clear.


I.e. once browser's WasResized method called, it invalidates whole drawing rectangle. After it invalidated - provide new image to be shown. May be this will be more helpful.
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am


Return to CefGlue Forum

Who is online

Users browsing this forum: No registered users and 20 guests