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 |