diff --git a/tests/cefclient/browser/main_context.h b/tests/cefclient/browser/main_context.h index c7b04cd9a..95a90b3ca 100644 --- a/tests/cefclient/browser/main_context.h +++ b/tests/cefclient/browser/main_context.h @@ -14,12 +14,6 @@ namespace client { -#if defined(OS_WIN) -namespace d3d11 { -class Device; -} -#endif - class RootWindowManager; // Used to store global context in the browser process. The methods of this @@ -58,10 +52,6 @@ class MainContext { // Returns the object used to create/manage RootWindow instances. virtual RootWindowManager* GetRootWindowManager() = 0; -#if defined(OS_WIN) - virtual std::shared_ptr GetD3D11Device() = 0; -#endif - protected: MainContext(); virtual ~MainContext(); diff --git a/tests/cefclient/browser/main_context_impl.h b/tests/cefclient/browser/main_context_impl.h index 345b054be..5fc663ad4 100644 --- a/tests/cefclient/browser/main_context_impl.h +++ b/tests/cefclient/browser/main_context_impl.h @@ -34,10 +34,6 @@ class MainContextImpl : public MainContext { void PopulateOsrSettings(OsrRendererSettings* settings) OVERRIDE; RootWindowManager* GetRootWindowManager() OVERRIDE; -#if defined(OS_WIN) - std::shared_ptr GetD3D11Device() OVERRIDE; -#endif - // Initialize CEF and associated main context state. This method must be // called on the same thread that created this object. bool Initialize(const CefMainArgs& args, @@ -79,7 +75,6 @@ class MainContextImpl : public MainContext { #if defined(OS_WIN) bool shared_texture_enabled_; - std::shared_ptr d3d11_device_; #endif bool external_begin_frame_enabled_; diff --git a/tests/cefclient/browser/main_context_impl_win.cc b/tests/cefclient/browser/main_context_impl_win.cc index d52c09430..4bf4d588b 100644 --- a/tests/cefclient/browser/main_context_impl_win.cc +++ b/tests/cefclient/browser/main_context_impl_win.cc @@ -7,8 +7,6 @@ #include #include -#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 MainContextImpl::GetD3D11Device() { - CEF_REQUIRE_UI_THREAD(); - if (!d3d11_device_) - d3d11_device_ = d3d11::Device::create(); - return d3d11_device_; -} - } // namespace client diff --git a/tests/cefclient/browser/osr_render_handler_win_d3d11.cc b/tests/cefclient/browser/osr_render_handler_win_d3d11.cc index bee903595..67f4d9051 100644 --- a/tests/cefclient/browser/osr_render_handler_win_d3d11.cc +++ b/tests/cefclient/browser/osr_render_handler_win_d3d11.cc @@ -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 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;