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

Side by Side Diff: Source/WebCore/platform/graphics/chromium/TextureManager.cpp

Issue 7749028: Compositor leaks all resources if tab is closed and it's not the last in the process (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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 unified diff | Download patch
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 79
80 bool TextureManager::isProtected(TextureToken token) 80 bool TextureManager::isProtected(TextureToken token)
81 { 81 {
82 return token && hasTexture(token) && m_textures.get(token).isProtected; 82 return token && hasTexture(token) && m_textures.get(token).isProtected;
83 } 83 }
84 84
85 void TextureManager::protectTexture(TextureToken token) 85 void TextureManager::protectTexture(TextureToken token)
86 { 86 {
87 ASSERT(hasTexture(token)); 87 ASSERT(hasTexture(token));
88 ASSERT(!m_textures.get(token).isProtected);
enne (OOO) 2011/08/26 22:17:03 Nit: This doesn't seem necessary. Maybe you didn'
89 TextureInfo info = m_textures.take(token); 88 TextureInfo info = m_textures.take(token);
90 info.isProtected = true; 89 info.isProtected = true;
91 m_textures.add(token, info); 90 m_textures.add(token, info);
92 } 91 }
93 92
94 void TextureManager::unprotectTexture(TextureToken token) 93 void TextureManager::unprotectTexture(TextureToken token)
95 { 94 {
96 TextureMap::iterator it = m_textures.find(token); 95 TextureMap::iterator it = m_textures.find(token);
97 if (it != m_textures.end()) 96 if (it != m_textures.end())
98 it->second.isProtected = false; 97 it->second.isProtected = false;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 info.format = format; 176 info.format = format;
178 info.textureId = textureId; 177 info.textureId = textureId;
179 info.isProtected = true; 178 info.isProtected = true;
180 addTexture(token, info); 179 addTexture(token, info);
181 return textureId; 180 return textureId;
182 } 181 }
183 182
184 } 183 }
185 184
186 #endif // USE(ACCELERATED_COMPOSITING) 185 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698