mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Remove the legacy off-screen rendering implementation. A new implementation is required (issue #1257).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1678 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -47,23 +47,6 @@
|
||||
|
||||
namespace {
|
||||
|
||||
bool IsAeroGlassEnabled() {
|
||||
if (base::win::GetVersion() < base::win::VERSION_VISTA)
|
||||
return false;
|
||||
|
||||
BOOL enabled = FALSE;
|
||||
return SUCCEEDED(DwmIsCompositionEnabled(&enabled)) && enabled;
|
||||
}
|
||||
|
||||
void SetAeroGlass(HWND hWnd) {
|
||||
if (!IsAeroGlassEnabled())
|
||||
return;
|
||||
|
||||
// Make the whole window transparent.
|
||||
MARGINS mgMarInset = { -1, -1, -1, -1 };
|
||||
DwmExtendFrameIntoClientArea(hWnd, &mgMarInset);
|
||||
}
|
||||
|
||||
HWND GetHWND(views::Widget* widget) {
|
||||
gfx::NativeWindow window = widget->GetNativeWindow();
|
||||
DCHECK(window);
|
||||
@ -714,13 +697,6 @@ LRESULT CALLBACK CefBrowserHostImpl::WndProc(HWND hwnd, UINT message,
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
return 0;
|
||||
|
||||
case WM_DWMCOMPOSITIONCHANGED:
|
||||
// Message sent to top-level windows when composition has been enabled or
|
||||
// disabled.
|
||||
if (browser && browser->IsTransparent())
|
||||
SetAeroGlass(hwnd);
|
||||
break;
|
||||
}
|
||||
|
||||
return DefWindowProc(hwnd, message, wParam, lParam);
|
||||
@ -761,12 +737,6 @@ bool CefBrowserHostImpl::PlatformCreateWindow() {
|
||||
if (!window_info_.window)
|
||||
return false;
|
||||
|
||||
if (window_info_.transparent_painting_enabled &&
|
||||
!(window_info_.style & WS_CHILD)) {
|
||||
// Transparent top-level windows will be given "sheet of glass" effect.
|
||||
SetAeroGlass(window_info_.window);
|
||||
}
|
||||
|
||||
// Set window user data to this object for future reference from the window
|
||||
// procedure.
|
||||
gfx::SetWindowUserData(window_info_.window, this);
|
||||
@ -823,9 +793,7 @@ void CefBrowserHostImpl::PlatformSizeTo(int width, int height) {
|
||||
}
|
||||
|
||||
CefWindowHandle CefBrowserHostImpl::PlatformGetWindowHandle() {
|
||||
return IsWindowRenderingDisabled() ?
|
||||
window_info_.parent_window :
|
||||
window_info_.window;
|
||||
return window_info_.window;
|
||||
}
|
||||
|
||||
bool CefBrowserHostImpl::PlatformViewText(const std::string& text) {
|
||||
@ -905,15 +873,6 @@ void CefBrowserHostImpl::PlatformHandleExternalProtocol(const GURL& url) {
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
bool CefBrowserHostImpl::IsWindowRenderingDisabled(const CefWindowInfo& info) {
|
||||
return info.windowless_rendering_enabled ? true : false;
|
||||
}
|
||||
|
||||
bool CefBrowserHostImpl::IsTransparent() {
|
||||
return window_info_.transparent_painting_enabled ? true : false;
|
||||
}
|
||||
|
||||
void CefBrowserHostImpl::PlatformTranslateKeyEvent(
|
||||
content::NativeWebKeyboardEvent& result, const CefKeyEvent& key_event) {
|
||||
result.timeStampSeconds = GetMessageTime() / 1000.0;
|
||||
@ -1058,16 +1017,10 @@ void CefBrowserHostImpl::PlatformTranslateMouseEvent(
|
||||
result.globalY = result.y;
|
||||
|
||||
// global position
|
||||
if (IsWindowRenderingDisabled()) {
|
||||
GetClient()->GetRenderHandler()->GetScreenPoint(GetBrowser(),
|
||||
result.x, result.y,
|
||||
result.globalX, result.globalY);
|
||||
} else {
|
||||
POINT globalPoint = { result.x, result.y };
|
||||
ClientToScreen(GetWindowHandle(), &globalPoint);
|
||||
result.globalX = globalPoint.x;
|
||||
result.globalY = globalPoint.y;
|
||||
}
|
||||
POINT globalPoint = { result.x, result.y };
|
||||
ClientToScreen(GetWindowHandle(), &globalPoint);
|
||||
result.globalX = globalPoint.x;
|
||||
result.globalY = globalPoint.y;
|
||||
|
||||
// modifiers
|
||||
result.modifiers |= TranslateModifiers(mouse_event.modifiers);
|
||||
|
Reference in New Issue
Block a user