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

Unified Diff: gpu/command_buffer/client/transfer_buffer.h

Issue 1168853002: Use mapped memory for uploading large textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added dcheck and improved other error messages Created 5 years, 6 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/client/ring_buffer_test.cc ('k') | gpu/command_buffer/client/transfer_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/transfer_buffer.h
diff --git a/gpu/command_buffer/client/transfer_buffer.h b/gpu/command_buffer/client/transfer_buffer.h
index 39e62a6c67d9431574c7ac8ce006a76785861895..e1f8e91ba43d08a046de8a4fec099f3c08f437d4 100644
--- a/gpu/command_buffer/client/transfer_buffer.h
+++ b/gpu/command_buffer/client/transfer_buffer.h
@@ -47,6 +47,8 @@ class GPU_EXPORT TransferBufferInterface {
virtual RingBuffer::Offset GetOffset(void* pointer) const = 0;
+ virtual void DiscardBlock(void* p) = 0;
+
virtual void FreePendingToken(void* p, unsigned int token) = 0;
};
@@ -71,6 +73,7 @@ class GPU_EXPORT TransferBuffer : public TransferBufferInterface {
void* AllocUpTo(unsigned int size, unsigned int* size_allocated) override;
void* Alloc(unsigned int size) override;
RingBuffer::Offset GetOffset(void* pointer) const override;
+ void DiscardBlock(void* p) override;
void FreePendingToken(void* p, unsigned int token) override;
// These are for testing.
@@ -163,6 +166,8 @@ class GPU_EXPORT ScopedTransferBufferPtr {
void Release();
+ void Discard();
+
void Reset(unsigned int new_size);
private:
« no previous file with comments | « gpu/command_buffer/client/ring_buffer_test.cc ('k') | gpu/command_buffer/client/transfer_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698