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:
Marshall Greenblatt
2011-10-21 19:35:19 +00:00
parent 34f6a2141e
commit 561bb6956b
19 changed files with 316 additions and 45 deletions

View File

@ -24,7 +24,7 @@ bool ClientHandler::OnBeforePopup(CefRefPtr<CefBrowser> parentBrowser,
#ifdef TEST_REDIRECT_POPUP_URLS
std::string urlStr = url;
if(urlStr.find("resources/inspector/devtools.html") == std::string::npos) {
if(urlStr.find("chrome-devtools:") == std::string::npos) {
// Show all popup windows excluding DevTools in the current window.
windowInfo.m_dwStyle &= ~WS_VISIBLE;
client = new ClientPopupHandler(m_Browser);
@ -95,6 +95,10 @@ bool ClientHandler::OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser,
resourceStream = GetBinaryResourceReader(IDS_MODALDIALOG);
response->SetMimeType("text/html");
response->SetStatus(200);
} else if(url == "http://tests/transparency") {
resourceStream = GetBinaryResourceReader(IDS_TRANSPARENCY);
response->SetMimeType("text/html");
response->SetStatus(200);
}
return false;
@ -120,7 +124,7 @@ void ClientHandler::OnTitleChange(CefRefPtr<CefBrowser> browser,
// Set the frame window title bar
CefWindowHandle hwnd = browser->GetWindowHandle();
if(!browser->IsPopup())
if(m_BrowserHwnd == hwnd)
{
// The frame window will be the parent of the browser window
hwnd = GetParent(hwnd);