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,8 +7,6 @@
#include <direct.h>
#include <shlobj.h>
#include "tests/cefclient/browser/osr_d3d11_win.h"
namespace client {
std::string MainContextImpl::GetDownloadPath(const std::string& file_name) {
@@ -38,11 +36,4 @@ std::string MainContextImpl::GetAppWorkingDirectory() {
return szWorkingDir;
}
std::shared_ptr<d3d11::Device> MainContextImpl::GetD3D11Device() {
CEF_REQUIRE_UI_THREAD();
if (!d3d11_device_)
d3d11_device_ = d3d11::Device::create();
return d3d11_device_;
}
} // namespace client