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

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

Issue 15798014: Replace context parenting by sharing through mailboxes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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.cc
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index 73482b09bfe445e806f47abdd6fe763d3b78275b..8f16bbb38a3151b4a8f2aa37a5630638a0dbd689 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -114,7 +114,6 @@ Texture::Texture(GLuint service_id)
npot_(false),
has_been_bound_(false),
framebuffer_attachment_count_(0),
- owned_(true),
stream_texture_(false),
immutable_(false),
estimated_size_(0),
@@ -143,7 +142,7 @@ void Texture::RemoveTextureRef(TextureRef* ref, bool have_context) {
size_t result = refs_.erase(ref);
DCHECK_EQ(result, 1u);
if (refs_.empty()) {
- if (owned_ && have_context) {
+ if (have_context) {
GLuint id = service_id();
glDeleteTextures(1, &id);
}
@@ -1042,10 +1041,7 @@ void TextureManager::SetLevelInfo(
Texture* TextureManager::Produce(TextureRef* ref) {
DCHECK(ref);
- Texture* texture = ref->texture();
- if (!texture->owned_)
- return NULL;
- return texture;
+ return ref->texture();
}
TextureRef* TextureManager::Consume(
« no previous file with comments | « gpu/command_buffer/service/texture_manager.h ('k') | gpu/command_buffer/service/texture_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698