Chromium Code Reviews| Index: content/browser/gpu/gpu_surface_tracker.h |
| diff --git a/content/browser/gpu/gpu_surface_tracker.h b/content/browser/gpu/gpu_surface_tracker.h |
| index 3a91214dd1593175e5a512617f1bd5366e7182a9..6d662559a22f00c823ec63ff9002dc1f7c4997e0 100644 |
| --- a/content/browser/gpu/gpu_surface_tracker.h |
| +++ b/content/browser/gpu/gpu_surface_tracker.h |
| @@ -29,27 +29,6 @@ namespace content { |
| // it is unamibiguously identified. |
| class CONTENT_EXPORT GpuSurfaceTracker : public GpuSurfaceLookup { |
| public: |
| - // Base class for reference counting surfaces. We store a |
| - // reference to an instance of this class in the surface_map_ |
| - // and GpuProcessHost (if the GPU process is drawing to |
| - // the surface with a Command Buffer). The reference count ensures that |
| - // we don't destroy the object until it's released from both places. |
| - // |
| - // This is especially important on Android and GTK where the surface must |
| - // not be destroyed when the WebContents is closed if the GPU is still |
| - // drawing to it. Those platforms extend this class with the functionality |
| - // they need to implement on tear down (see SurfaceRefPluginWindow for GTK and |
| - // SurfaceRefAndroid for Android). |
| - class SurfaceRef : public base::RefCountedThreadSafe<SurfaceRef> { |
|
piman
2015/09/23 04:50:51
This does nothing at all. I removed users.
|
| - protected: |
| - SurfaceRef() { } |
| - virtual ~SurfaceRef() { } |
| - |
| - private: |
| - friend class base::RefCountedThreadSafe<SurfaceRef>; |
| - DISALLOW_COPY_AND_ASSIGN(SurfaceRef); |
| - }; |
| - |
| // GpuSurfaceLookup implementation: |
| // Returns the native widget associated with a given surface_id. |
| gfx::AcceleratedWidget AcquireNativeWidget(int surface_id) override; |
| @@ -73,23 +52,10 @@ class CONTENT_EXPORT GpuSurfaceTracker : public GpuSurfaceLookup { |
| // Removes a given existing surface. |
| void RemoveSurface(int surface_id); |
| - // Gets the renderer process ID and RenderWidgetHost route id for a given |
| - // surface, returning true if the surface is found (and corresponds to a |
| - // RenderWidgetHost), or false if not. |
| - bool GetRenderWidgetIDForSurface(int surface_id, |
| - int* renderer_id, |
| - int* render_widget_id); |
| - |
| // Sets the native handle for the given surface. |
| // Note: This is an O(log N) lookup. |
| void SetSurfaceHandle(int surface_id, const gfx::GLSurfaceHandle& handle); |
| - // Sets the native widget associated with the surface_id. |
| - void SetNativeWidget( |
| - int surface_id, |
| - gfx::AcceleratedWidget widget, |
| - SurfaceRef* surface_ref); |
| - |
| // Gets the native handle for the given surface. |
| // Note: This is an O(log N) lookup. |
| gfx::GLSurfaceHandle GetSurfaceHandle(int surface_id); |
| @@ -101,24 +67,18 @@ class CONTENT_EXPORT GpuSurfaceTracker : public GpuSurfaceLookup { |
| // named that way for the implementation of Singleton. |
| static GpuSurfaceTracker* GetInstance(); |
| - scoped_refptr<SurfaceRef> GetSurfaceRefForSurface(int surface_id) { |
| - return surface_map_[surface_id].surface_ref; |
| - } |
| - |
| private: |
| struct SurfaceInfo { |
| SurfaceInfo(); |
| SurfaceInfo(int renderer_id, |
| int render_widget_id, |
| const gfx::AcceleratedWidget& native_widget, |
| - const gfx::GLSurfaceHandle& handle, |
| - const scoped_refptr<SurfaceRef>& surface_ref); |
| + const gfx::GLSurfaceHandle& handle); |
| ~SurfaceInfo(); |
| int renderer_id; |
| int render_widget_id; |
| gfx::AcceleratedWidget native_widget; |
| gfx::GLSurfaceHandle handle; |
| - scoped_refptr<SurfaceRef> surface_ref; |
| }; |
| typedef std::map<int, SurfaceInfo> SurfaceMap; |