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

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

Issue 2317363005: Add basic GL functionality to the passthrough command buffer. (Closed)
Patch Set: Handle bind_generates_resource Created 4 years, 3 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 1614c72a225d0fe0acff42a0d77e9f4f38ae8117..b6a446e5dbed2678e887c43f40727c9df0230545 100644
--- a/gpu/command_buffer/service/texture_manager.h
+++ b/gpu/command_buffer/service/texture_manager.h
@@ -65,6 +65,28 @@ class GPU_EXPORT TextureBase {
MailboxManager* mailbox_manager_;
};
+// A ref-counted version of the TextureBase class that deletes the texture after
+// all references have been released.
+class TexturePassthrough final : public TextureBase,
+ public base::RefCounted<TexturePassthrough> {
+ public:
+ explicit TexturePassthrough(GLuint service_id);
+
+ // Notify the texture that the context is lost and it shouldn't delete the
+ // native GL texture in the destructor
+ void MarkContextLost();
+
+ protected:
+ ~TexturePassthrough() override;
+
+ private:
+ friend class base::RefCounted<TexturePassthrough>;
+
+ bool have_context_;
+
+ DISALLOW_COPY_AND_ASSIGN(TexturePassthrough);
+};
+
// Info about Textures currently in the system.
// This class wraps a real GL texture, keeping track of its meta-data. It is
// jointly owned by possibly multiple TextureRef.
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698