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

Unified Diff: gpu/command_buffer/common/discardable_handle.h

Issue 2814583002: Service/ClientDiscardableManager (Closed)
Patch Set: rebase Created 3 years, 7 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/cmd_buffer_functions.txt ('k') | gpu/command_buffer/common/discardable_handle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/discardable_handle.h
diff --git a/gpu/command_buffer/common/discardable_handle.h b/gpu/command_buffer/common/discardable_handle.h
index a3b17691da9a2d6b5d6893660856d2b36a1bfab2..7d4c52868f2db2f30cda71bca5d6f75afe315c2f 100644
--- a/gpu/command_buffer/common/discardable_handle.h
+++ b/gpu/command_buffer/common/discardable_handle.h
@@ -37,8 +37,9 @@ class GPU_EXPORT DiscardableHandleBase {
uint32_t byte_offset() const { return byte_offset_; }
// Test only functions.
- bool IsLockedForTesting();
- bool IsDeletedForTesting();
+ bool IsLockedForTesting() const;
+ bool IsDeletedForTesting() const;
+ scoped_refptr<Buffer> BufferForTesting() const { return buffer_; }
protected:
DiscardableHandleBase(scoped_refptr<Buffer> buffer,
@@ -98,6 +99,11 @@ class GPU_EXPORT ServiceDiscardableHandle : public DiscardableHandleBase {
// Tries to delete the handle. Returns true if successfully deleted. Returns
// false if the handle is locked client-side and cannot be deleted.
bool Delete();
+
+ // Deletes the handle, regardless of the handle's state. This should be
+ // called in response to glDeleteTextures, which may be called while the
+ // handle is in the locked or unlocked state.
+ void ForceDelete();
};
} // namespace gpu
« no previous file with comments | « gpu/command_buffer/cmd_buffer_functions.txt ('k') | gpu/command_buffer/common/discardable_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698