Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Unified Diff: gpu/command_buffer/service/texture_manager.h

Issue 2814583002: Service/ClientDiscardableManager (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};
« no previous file with comments | « gpu/command_buffer/service/service_discardable_manager_unittest.cc ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698