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

Side by Side Diff: cc/CCPrioritizedTextureManager.h

Issue 10947017: Enable removing uploads to evicted textures from texture upload queues. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « cc/CCPrioritizedTexture.cpp ('k') | cc/CCPrioritizedTextureManager.cpp » ('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 CCPrioritizedTextureManager_h 5 #ifndef CCPrioritizedTextureManager_h
6 #define CCPrioritizedTextureManager_h 6 #define CCPrioritizedTextureManager_h
7 7
8 #include "CCPrioritizedTexture.h" 8 #include "CCPrioritizedTexture.h"
9 #include "CCPriorityCalculator.h" 9 #include "CCPriorityCalculator.h"
10 #include "CCTexture.h" 10 #include "CCTexture.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 size_t memoryAboveCutoffBytes() const { return m_memoryAboveCutoffBytes; } 50 size_t memoryAboveCutoffBytes() const { return m_memoryAboveCutoffBytes; }
51 size_t memoryForSelfManagedTextures() const { return m_maxMemoryLimitBytes - m_memoryAvailableBytes; } 51 size_t memoryForSelfManagedTextures() const { return m_maxMemoryLimitBytes - m_memoryAvailableBytes; }
52 52
53 void setMaxMemoryLimitBytes(size_t bytes) { m_maxMemoryLimitBytes = bytes; } 53 void setMaxMemoryLimitBytes(size_t bytes) { m_maxMemoryLimitBytes = bytes; }
54 size_t maxMemoryLimitBytes() const { return m_maxMemoryLimitBytes; } 54 size_t maxMemoryLimitBytes() const { return m_maxMemoryLimitBytes; }
55 55
56 void prioritizeTextures(); 56 void prioritizeTextures();
57 void clearPriorities(); 57 void clearPriorities();
58 58
59 void reduceMemoryOnImplThread(size_t limitBytes, CCResourceProvider*); 59 void reduceMemoryOnImplThread(size_t limitBytes, CCResourceProvider*);
60 bool evictedBackingsExist() const { return !m_evictedBackings.isEmpty(); }
60 void getEvictedBackings(BackingVector& evictedBackings); 61 void getEvictedBackings(BackingVector& evictedBackings);
61 void unlinkEvictedBackings(const BackingVector& evictedBackings); 62 void unlinkEvictedBackings(const BackingVector& evictedBackings);
62 // Deletes all evicted backings, unlinking them from their owning textures i f needed. 63 // Deletes all evicted backings, unlinking them from their owning textures i f needed.
63 // Returns true if this function to unlinked any backings from their owning texture while 64 // Returns true if this function unlinked any backings from their owning tex ture while
64 // destroying them. 65 // destroying them.
65 bool deleteEvictedBackings(); 66 bool deleteEvictedBackings();
66 67
67 bool requestLate(CCPrioritizedTexture*); 68 bool requestLate(CCPrioritizedTexture*);
68 69
69 void reduceMemory(CCResourceProvider*); 70 void reduceMemory(CCResourceProvider*);
70 void clearAllMemory(CCResourceProvider*); 71 void clearAllMemory(CCResourceProvider*);
71 72
72 void acquireBackingTextureIfNeeded(CCPrioritizedTexture*, CCResourceProvider *); 73 void acquireBackingTextureIfNeeded(CCPrioritizedTexture*, CCResourceProvider *);
73 74
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 BackingVector m_tempBackingVector; 137 BackingVector m_tempBackingVector;
137 138
138 // Set by the main thread when it adjust priorities in such a way that 139 // Set by the main thread when it adjust priorities in such a way that
139 // the m_backings array's view of priorities is now out of date. 140 // the m_backings array's view of priorities is now out of date.
140 bool m_needsUpdateBackingsPrioritites; 141 bool m_needsUpdateBackingsPrioritites;
141 }; 142 };
142 143
143 } // cc 144 } // cc
144 145
145 #endif 146 #endif
OLDNEW
« no previous file with comments | « cc/CCPrioritizedTexture.cpp ('k') | cc/CCPrioritizedTextureManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698