Windows: cefclient: Create a new D3D11 device for each browser (issue #2538)

This fixes a texture resizing issue when creating multiple windows with OSR
and shared textures enabled.
This commit is contained in:
Marshall Greenblatt
2018-11-15 15:42:50 -05:00
parent 3e06fa8271
commit 91a1286d52
4 changed files with 2 additions and 27 deletions

View File

@@ -7,7 +7,6 @@
#include "include/base/cef_bind.h"
#include "include/wrapper/cef_closure_task.h"
#include "include/wrapper/cef_helpers.h"
#include "tests/cefclient/browser/main_context.h"
#include "tests/shared/browser/util_win.h"
namespace client {
@@ -80,8 +79,8 @@ bool OsrRenderHandlerWinD3D11::Initialize(CefRefPtr<CefBrowser> browser,
int height) {
CEF_REQUIRE_UI_THREAD();
// Retrieve the shared D3D11 device instance.
device_ = MainContext::Get()->GetD3D11Device();
// Create a D3D11 device instance.
device_ = d3d11::Device::create();
DCHECK(device_);
if (!device_)
return false;