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

Side by Side Diff: cc/prioritized_texture.h

Issue 11028132: cc: The recent texture manager bug uncovered some unnecessary code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to ToT Created 8 years, 1 month 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 | « cc/overdraw_metrics.cc ('k') | cc/prioritized_texture.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CCPrioritizedTexture_h 5 #ifndef CCPrioritizedTexture_h
6 #define CCPrioritizedTexture_h 6 #define CCPrioritizedTexture_h
7 7
8 #include "IntRect.h" 8 #include "IntRect.h"
9 #include "IntSize.h" 9 #include "IntSize.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 ResourceProvider::ResourceId resourceId() const; 76 ResourceProvider::ResourceId resourceId() const;
77 77
78 // Self-managed textures are accounted for when prioritizing other textures, 78 // Self-managed textures are accounted for when prioritizing other textures,
79 // but they are not allocated/recycled/deleted, so this needs to be done 79 // but they are not allocated/recycled/deleted, so this needs to be done
80 // externally. canAcquireBackingTexture() indicates if the texture would hav e 80 // externally. canAcquireBackingTexture() indicates if the texture would hav e
81 // been allowed given its priority. 81 // been allowed given its priority.
82 void setIsSelfManaged(bool isSelfManaged) { m_isSelfManaged = isSelfManaged; } 82 void setIsSelfManaged(bool isSelfManaged) { m_isSelfManaged = isSelfManaged; }
83 bool isSelfManaged() { return m_isSelfManaged; } 83 bool isSelfManaged() { return m_isSelfManaged; }
84 void setToSelfManagedMemoryPlaceholder(size_t bytes); 84 void setToSelfManagedMemoryPlaceholder(size_t bytes);
85 85
86 void returnBackingTexture();
87
86 private: 88 private:
87 friend class PrioritizedTextureManager; 89 friend class PrioritizedTextureManager;
88 friend class PrioritizedTextureTest; 90 friend class PrioritizedTextureTest;
89 91
90 class Backing : public Texture { 92 class Backing : public Texture {
91 public: 93 public:
92 Backing(unsigned id, ResourceProvider*, IntSize, GLenum format); 94 Backing(unsigned id, ResourceProvider*, IntSize, GLenum format);
93 ~Backing(); 95 ~Backing();
94 void updatePriority(); 96 void updatePriority();
95 void updateInDrawingImplTree(); 97 void updateInDrawingImplTree();
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 143
142 Backing* m_backing; 144 Backing* m_backing;
143 PrioritizedTextureManager* m_manager; 145 PrioritizedTextureManager* m_manager;
144 146
145 DISALLOW_COPY_AND_ASSIGN(PrioritizedTexture); 147 DISALLOW_COPY_AND_ASSIGN(PrioritizedTexture);
146 }; 148 };
147 149
148 } // namespace cc 150 } // namespace cc
149 151
150 #endif 152 #endif
OLDNEW
« no previous file with comments | « cc/overdraw_metrics.cc ('k') | cc/prioritized_texture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698