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

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

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
« no previous file with comments | « gpu/command_buffer/service/texture_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_manager.cc
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index 67615bf25d6a3a39a8ca9772d174c0e343a8954c..f1916455cc1672702e9dc8f725405b3a288063b7 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -372,6 +372,20 @@ void TextureBase::SetMailboxManager(MailboxManager* mailbox_manager) {
mailbox_manager_ = mailbox_manager;
}
+TexturePassthrough::TexturePassthrough(GLuint service_id)
+ : TextureBase(service_id), have_context_(true) {}
+
+TexturePassthrough::~TexturePassthrough() {
+ DeleteFromMailboxManager();
+ if (have_context_) {
+ glDeleteTextures(1, &service_id_);
+ }
+}
+
+void TexturePassthrough::MarkContextLost() {
+ have_context_ = false;
+}
+
Texture::Texture(GLuint service_id)
: TextureBase(service_id),
memory_tracking_ref_(NULL),
« no previous file with comments | « gpu/command_buffer/service/texture_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698