mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Make off-screen rendering example work with multi-threaded message loop mode (issue #804).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@938 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_render_handler.h"
|
||||
#include "tests/cefclient/client_handler.h"
|
||||
#include "tests/cefclient/osrenderer.h"
|
||||
|
||||
class OSRBrowserProvider {
|
||||
@@ -17,14 +18,15 @@ class OSRBrowserProvider {
|
||||
virtual ~OSRBrowserProvider() {}
|
||||
};
|
||||
|
||||
class OSRWindow : public CefRenderHandler {
|
||||
class OSRWindow : public ClientHandler::RenderHandler {
|
||||
public:
|
||||
// Create a new OSRWindow instance. |browser_provider| must outlive this
|
||||
// object.
|
||||
static CefRefPtr<OSRWindow> Create(OSRBrowserProvider* browser_provider,
|
||||
bool transparent);
|
||||
|
||||
static CefRefPtr<OSRWindow> From(CefRefPtr<CefRenderHandler> renderHandler);
|
||||
static CefRefPtr<OSRWindow> From(
|
||||
CefRefPtr<ClientHandler::RenderHandler> renderHandler);
|
||||
|
||||
// Create the underlying window.
|
||||
bool CreateWidget(HWND hWndParent, const RECT& rect,
|
||||
@@ -37,6 +39,9 @@ class OSRWindow : public CefRenderHandler {
|
||||
return hWnd_;
|
||||
}
|
||||
|
||||
// ClientHandler::RenderHandler methods
|
||||
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
|
||||
// CefRenderHandler methods
|
||||
virtual bool GetRootScreenRect(CefRefPtr<CefBrowser> browser,
|
||||
CefRect& rect) OVERRIDE;
|
||||
@@ -66,7 +71,7 @@ class OSRWindow : public CefRenderHandler {
|
||||
|
||||
void EnableGL();
|
||||
void DisableGL();
|
||||
void Reset();
|
||||
void OnDestroyed();
|
||||
static ATOM RegisterOSRClass(HINSTANCE hInstance, LPCTSTR className);
|
||||
static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
||||
LPARAM lParam);
|
||||
|
Reference in New Issue
Block a user