mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add support for transparency on Windows (issue #99).
- Enable the use of Skia instead of GDI for text rendering. - Add a new CefWindowInfo::m_bTransparentPainting member. - Add transparent popup window and off-screen rendering examples to cefclient. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@334 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -374,7 +374,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
// Initialize window info to the defaults for a child window
|
||||
info.SetAsChild(hWnd, rect);
|
||||
|
||||
// Creat the new child child browser window
|
||||
// Creat the new child browser window
|
||||
CefBrowser::CreateBrowser(info,
|
||||
static_cast<CefRefPtr<CefClient> >(g_handler),
|
||||
"http://www.google.com", settings);
|
||||
@ -495,6 +495,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
if(browser.get())
|
||||
RunPopupTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_TRANSPARENT_POPUP: // Test a transparent popup window
|
||||
if(browser.get())
|
||||
RunTransparentPopupTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_REQUEST: // Test a request
|
||||
if(browser.get())
|
||||
RunRequestTest(browser);
|
||||
@ -509,7 +513,11 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
return 0;
|
||||
case ID_TESTS_OSRAPP: // Test the OSR app
|
||||
if(browser.get())
|
||||
RunOSRPluginTest(browser);
|
||||
RunOSRPluginTest(browser, false);
|
||||
return 0;
|
||||
case ID_TESTS_TRANSPARENT_OSRAPP: // Test the OSR app with transparency
|
||||
if(browser.get())
|
||||
RunOSRPluginTest(browser, true);
|
||||
return 0;
|
||||
case ID_TESTS_DOMACCESS: // Test DOM access
|
||||
if(browser.get())
|
||||
@ -665,3 +673,20 @@ std::string AppGetWorkingDirectory()
|
||||
{
|
||||
return szWorkingDir;
|
||||
}
|
||||
|
||||
void RunTransparentPopupTest(CefRefPtr<CefBrowser> browser)
|
||||
{
|
||||
CefWindowInfo info;
|
||||
CefBrowserSettings settings;
|
||||
|
||||
// Initialize window info to the defaults for a popup window
|
||||
info.SetAsPopup(NULL, "TransparentPopup");
|
||||
info.SetTransparentPainting(TRUE);
|
||||
info.m_nWidth = 500;
|
||||
info.m_nHeight = 500;
|
||||
|
||||
// Creat the popup browser window
|
||||
CefBrowser::CreateBrowser(info,
|
||||
static_cast<CefRefPtr<CefClient> >(g_handler),
|
||||
"http://tests/transparency", settings);
|
||||
}
|
||||
|
Reference in New Issue
Block a user