Index: gpu/command_buffer/service/texture_manager.h |
diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h |
index bc215ac941923f6b0a7caaedcca0c2317828424e..0d62faf78bb7b9ac8e9aad6453da7df079ca8bbf 100644 |
--- a/gpu/command_buffer/service/texture_manager.h |
+++ b/gpu/command_buffer/service/texture_manager.h |
@@ -27,8 +27,9 @@ |
#include "ui/gl/gl_image.h" |
namespace gpu { |
-namespace gles2 { |
+class ServiceDiscardableManager; |
+namespace gles2 { |
class GLES2Decoder; |
class GLStreamTextureImage; |
struct ContextState; |
@@ -755,7 +756,8 @@ class GPU_EXPORT TextureManager : public base::trace_event::MemoryDumpProvider { |
GLsizei max_3d_texture_size, |
GLsizei max_array_texture_layers, |
bool use_default_textures, |
- ProgressReporter* progress_reporter); |
+ ProgressReporter* progress_reporter, |
+ ServiceDiscardableManager* discardable_manager); |
~TextureManager() override; |
void AddFramebufferManager(FramebufferManager* framebuffer_manager); |
@@ -897,6 +899,12 @@ class GPU_EXPORT TextureManager : public base::trace_event::MemoryDumpProvider { |
// Gets the texture info for the given texture. |
TextureRef* GetTexture(GLuint client_id) const; |
+ // Takes the TextureRef for the given texture out of the texture manager. |
+ scoped_refptr<TextureRef> TakeTexture(GLuint client_id); |
+ |
+ // Returns a TextureRef to the texture manager. |
+ void ReturnTexture(scoped_refptr<TextureRef> texture_ref); |
+ |
// Removes a texture info. |
void RemoveTexture(GLuint client_id); |
@@ -1235,6 +1243,8 @@ class GPU_EXPORT TextureManager : public base::trace_event::MemoryDumpProvider { |
// using in-process command buffer. |
ProgressReporter* progress_reporter_; |
+ ServiceDiscardableManager* discardable_manager_; |
+ |
DISALLOW_COPY_AND_ASSIGN(TextureManager); |
}; |