| Index: content/browser/compositor/delegated_frame_host.cc
|
| diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc
|
| index e6ab7bb05aaed5f7d6acc8d1804b4c57fe1469f6..a18c482a24bfea1798a8a2d5ab1feeb93b9b3980 100644
|
| --- a/content/browser/compositor/delegated_frame_host.cc
|
| +++ b/content/browser/compositor/delegated_frame_host.cc
|
| @@ -26,6 +26,7 @@
|
| #include "content/browser/gpu/compositor_util.h"
|
| #include "content/common/gpu/client/gl_helper.h"
|
| #include "content/public/browser/render_widget_host_view_frame_subscriber.h"
|
| +#include "content/public/browser/surface_utils.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "media/base/video_frame.h"
|
| #include "media/base/video_util.h"
|
| @@ -77,7 +78,7 @@ DelegatedFrameHost::DelegatedFrameHost(DelegatedFrameHostClient* client)
|
| ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
|
| factory->AddObserver(this);
|
| id_allocator_ = factory->GetContextFactory()->CreateSurfaceIdAllocator();
|
| - factory->GetSurfaceManager()->RegisterSurfaceFactoryClient(
|
| + GetSurfaceManager()->RegisterSurfaceFactoryClient(
|
| id_allocator_->id_namespace(), this);
|
| }
|
|
|
| @@ -449,8 +450,7 @@ void DelegatedFrameHost::SwapDelegatedFrame(
|
| DCHECK(frame_data->resource_list.empty());
|
| EvictDelegatedFrame();
|
| } else {
|
| - ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
|
| - cc::SurfaceManager* manager = factory->GetSurfaceManager();
|
| + cc::SurfaceManager* manager = GetSurfaceManager();
|
| if (!surface_factory_) {
|
| surface_factory_ =
|
| make_scoped_ptr(new cc::SurfaceFactory(manager, this));
|
| @@ -815,7 +815,7 @@ DelegatedFrameHost::~DelegatedFrameHost() {
|
|
|
| if (!surface_id_.is_null())
|
| surface_factory_->Destroy(surface_id_);
|
| - factory->GetSurfaceManager()->UnregisterSurfaceFactoryClient(
|
| + GetSurfaceManager()->UnregisterSurfaceFactoryClient(
|
| id_allocator_->id_namespace());
|
|
|
| DCHECK(!vsync_manager_.get());
|
| @@ -831,9 +831,8 @@ void DelegatedFrameHost::SetCompositor(ui::Compositor* compositor) {
|
| vsync_manager_ = compositor_->vsync_manager();
|
| vsync_manager_->AddObserver(this);
|
|
|
| - ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
|
| uint32_t parent = compositor->surface_id_allocator()->id_namespace();
|
| - factory->GetSurfaceManager()->RegisterSurfaceNamespaceHierarchy(
|
| + GetSurfaceManager()->RegisterSurfaceNamespaceHierarchy(
|
| parent, id_allocator_->id_namespace());
|
| }
|
|
|
| @@ -851,9 +850,8 @@ void DelegatedFrameHost::ResetCompositor() {
|
| vsync_manager_ = NULL;
|
| }
|
|
|
| - ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
|
| uint32_t parent = compositor_->surface_id_allocator()->id_namespace();
|
| - factory->GetSurfaceManager()->UnregisterSurfaceNamespaceHierarchy(
|
| + GetSurfaceManager()->UnregisterSurfaceNamespaceHierarchy(
|
| parent, id_allocator_->id_namespace());
|
|
|
| compositor_ = nullptr;
|
|
|