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

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

Issue 7518016: Revert 94743 - Allow the renderer process to map textures from one context into another. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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/gpu_scheduler.cc ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_manager.h
===================================================================
--- gpu/command_buffer/service/texture_manager.h (revision 94807)
+++ gpu/command_buffer/service/texture_manager.h (working copy)
@@ -10,7 +10,6 @@
#include "base/hash_tables.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
#include "gpu/command_buffer/service/gl_utils.h"
namespace gpu {
@@ -23,7 +22,7 @@
//
// NOTE: To support shared resources an instance of this class will need to be
// shared by multiple GLES2Decoders.
-class TextureManager : public base::SupportsWeakPtr<TextureManager> {
+class TextureManager {
public:
// Info about Textures currently in the system.
class TextureInfo : public base::RefCounted<TextureInfo> {
@@ -43,7 +42,8 @@
cube_complete_(false),
npot_(false),
has_been_bound_(false),
- framebuffer_attachment_count_(0) {
+ framebuffer_attachment_count_(0),
+ owned_(true) {
}
GLenum min_filter() const {
@@ -96,10 +96,6 @@
return npot_;
}
- TextureManager* owner() const {
- return owner_.get();
- }
-
// Returns true if mipmaps can be generated by GL.
bool CanGenerateMipmaps(const FeatureInfo* feature_info) const;
@@ -132,6 +128,10 @@
return target() && !IsDeleted();
}
+ void SetNotOwned() {
+ owned_ = false;
+ }
+
bool IsAttachedToFramebuffer() const {
return framebuffer_attachment_count_ != 0;
}
@@ -250,9 +250,9 @@
// The number of framebuffers this texture is attached to.
int framebuffer_attachment_count_;
- // The framebuffer manager that controls the lifetime of this framebuffer
- // or NULL if it has been deleted.
- base::WeakPtr<TextureManager> owner_;
+ // Whether the associated context group owns this texture and should delete
+ // it.
+ bool owned_;
DISALLOW_COPY_AND_ASSIGN(TextureInfo);
};
@@ -338,12 +338,6 @@
// Gets the texture info for the given texture.
TextureInfo* GetTextureInfo(GLuint client_id);
- // Adds a texture info for a texture owned by another texture
- // manager.
- void AddTextureInfo(const FeatureInfo* feature_info,
- GLuint client_id,
- TextureInfo* info);
-
// Removes a texture info.
void RemoveTextureInfo(const FeatureInfo* feature_info, GLuint client_id);
Property changes on: gpu/command_buffer/service/texture_manager.h
___________________________________________________________________
Added: svn:mergeinfo
Merged /trunk/src/o3d/gpu/command_buffer/service/texture_manager.h:r32866-32958
Merged /branches/chrome_webkit_merge_branch/o3d/gpu/command_buffer/service/texture_manager.h:r69-2775
« no previous file with comments | « gpu/command_buffer/service/gpu_scheduler.cc ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698