mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Windows: Improvements to off-screen rendering support (issue #518).
- Implement support for transparency. Change the backing store to use Skia instead of GDI and to keep alpha values. - Implement support for select popups. Requires a patch to Chromium (content_popups.patch). - Implicitly disable accelerated compositing when using off-screen rendering. - Introduce a new CefMouseEvent structure for representing mouse event information passed to CefBrowser methods. - Merge cef_key_event_modifiers_t into cef_event_flags_t. - Add a new argument to CefBrowser::Invalidate telling the browser whether to invalidate the select popup or the main view. - Add a new cefclient "transparent-painting-enabled" command-line flag to test transparent off-screen rendering. - Add a new cefclient "Transparency" test. - Fix the cefclient off-screen rendering rotation effect to work even when the underlying web content is not updating. - Add unit tests for transparent painting and select popups. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@979 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
#include "cefclient/binding_test.h"
|
||||
#include "cefclient/cefclient_osr_widget_win.h"
|
||||
#include "cefclient/client_handler.h"
|
||||
#include "cefclient/client_switches.h"
|
||||
#include "cefclient/dialog_test.h"
|
||||
#include "cefclient/dom_test.h"
|
||||
#include "cefclient/performance_test.h"
|
||||
@ -311,11 +312,15 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
||||
AppGetBrowserSettings(settings);
|
||||
|
||||
if (AppIsOffScreenRenderingEnabled()) {
|
||||
CefRefPtr<CefCommandLine> cmd_line = AppGetCommandLine();
|
||||
bool transparent =
|
||||
cmd_line->HasSwitch(cefclient::kTransparentPaintingEnabled);
|
||||
|
||||
CefRefPtr<OSRWindow> osr_window =
|
||||
OSRWindow::Create(&g_main_browser_provider, false);
|
||||
OSRWindow::Create(&g_main_browser_provider, transparent);
|
||||
osr_window->CreateWidget(hWnd, rect, hInst, szOSRWindowClass);
|
||||
info.SetAsOffScreen(osr_window->hwnd());
|
||||
info.SetTransparentPainting(FALSE);
|
||||
info.SetTransparentPainting(transparent ? TRUE : FALSE);
|
||||
g_handler->SetOSRHandler(osr_window.get());
|
||||
} else {
|
||||
// Initialize window info to the defaults for a child window.
|
||||
@ -458,6 +463,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
||||
if (browser.get())
|
||||
RunGeolocationTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_TRANSPARENCY: // Test transparency
|
||||
if (browser.get())
|
||||
RunTransparencyTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_ZOOM_IN:
|
||||
if (browser.get())
|
||||
ModifyZoom(browser, 0.5);
|
||||
|
Reference in New Issue
Block a user