| 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
|
|
|
|
|