Does CEF3 support Transparent window in Win32?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Does CEF3 support Transparent window in Win32?

Postby luyuandotorg » Tue Oct 30, 2012 6:19 am

I used transparent window on CEF1 program, and it is wonderful. Now I change the program for CEF3, I don't know how to enable the transparent window on my program. How to do it?


Thanks !!!!


LY
luyuandotorg
Newbie
 
Posts: 7
Joined: Wed Jul 27, 2011 9:41 pm

Re: Does CEF3 support Transparent window in Win32?

Postby magreenblatt » Wed Oct 31, 2012 9:16 am

It is not supported yet.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Does CEF3 support Transparent window in Win32?

Postby fddima » Tue Jan 08, 2013 10:17 am

magreenblatt wrote:It is not supported yet.

It is still not implemented in CEF3, yes?
It is complex?
What steps must be done to support transparent painting for native window (on windows)?
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Does CEF3 support Transparent window in Win32?

Postby magreenblatt » Mon Jan 14, 2013 10:01 am

Transparency is currently supported in CEF3 with off-screen rendering (Windows only).

Some information about the changes required to support transparency with windowed rendering in CEF3 on Mac: http://code.google.com/p/chromiumembedd ... ail?id=468. On Windows: https://groups.google.com/a/chromium.or ... uafwJvlBbY
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Does CEF3 support Transparent window in Win32?

Postby fddima » Mon Jan 14, 2013 11:18 am

magreenblatt wrote:Transparency is currently supported in CEF3 with off-screen rendering (Windows only).

Some information about the changes required to support transparency with windowed rendering in CEF3 on Mac: http://code.google.com/p/chromiumembedd ... ail?id=468. On Windows: https://groups.google.com/a/chromium.or ... uafwJvlBbY


Thanks! Looks as not too hard (windows).
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Does CEF3 support Transparent window in Win32?

Postby fddima » Tue Jan 15, 2013 7:11 pm

I tried it against CEF3 R980, but no have luck.

Looks like window are prepared to be transparent in windows 7 (i.e. aero support, etc) by CEF normally, but i'm see transparent aero window and then browser window (not transparent).

I found in content/renderer/render_view_impl.cc that:

Code: Select all
void RenderViewImpl::OnSetBackground(const SkBitmap& background) {
  if (webview())
    webview()->setIsTransparent(!background.empty());

  SetBackground(background);
}


I.e. it becomes transparent when we set background... something like happens in render_widget_host_view_osr.cc in InstallTransparency method. But i'm not see how it can be installed for native window. I.e. something analogue with webview setIsTransparent(true)...

May be in CefBrowserHostImpl::Create when transparency painting enabled (and window rendering enabled too, of course) - it will be enough to setup
RenderWidgetHostView with this method?

// Subclasses should override this method to do what is appropriate to set
// the custom background for their platform.
virtual void SetBackground(const SkBitmap& background) = 0;

Or may be some one have other pointers?
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Does CEF3 support Transparent window in Win32?

Postby efranco23 » Wed Mar 06, 2013 8:19 am

Hi, ffdima!

Have you achieved sucess in this?

I´m stuck with this...

viewtopic.php?f=6&t=10504

Can you share your progress, please?

Thanks!
Eder Franco
Manaus, AM - Brazil
efranco23
Newbie
 
Posts: 9
Joined: Mon Feb 25, 2013 2:52 pm

Re: Does CEF3 support Transparent window in Win32?

Postby fddima » Wed Mar 06, 2013 8:43 am

efranco23 wrote:Can you share your progress, please?

I'm doesn't touch this question more deeply than this is described at this topic, and doesn't have plans.
Read Chromium on Windows 7 + Transparency - it contains almost all sensitive information about this.
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Does CEF3 support Transparent window in Win32?

Postby efranco23 » Wed Mar 06, 2013 1:58 pm

Thank you for reply. I´ll look further at this.
Eder Franco
Manaus, AM - Brazil
efranco23
Newbie
 
Posts: 9
Joined: Mon Feb 25, 2013 2:52 pm

Re: Does CEF3 support Transparent window in Win32?

Postby yosoymin » Tue Sep 08, 2020 7:08 am

I've found a way this is possible using views framework and a simple modification in CEF code. This is working in Windows and Linux. More info in this thread: viewtopic.php?f=8&t=17421
yosoymin
Techie
 
Posts: 11
Joined: Mon Mar 02, 2020 1:28 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 28 guests