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

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

Issue 116863003: gpu: Reuse transfer buffers more aggresively (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: [RFC] gpu: Reuse transfer buffers more aggressively Created 7 years 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
Index: gpu/command_buffer/client/gles2_implementation.h
diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h
index 6b6877f18b3bc74b7f92b7d08a469f42a53668d1..b496a88c7c8a7feba3cdaacb370b2a47ffceb746 100644
--- a/gpu/command_buffer/client/gles2_implementation.h
+++ b/gpu/command_buffer/client/gles2_implementation.h
@@ -591,6 +591,21 @@ class GLES2_IMPL_EXPORT GLES2Implementation
void OnSwapBuffersComplete();
+ // Free transfer buffer if unused token already passed, or free pending
+ // the unused token if not.
+ void FreeTransferBuffer(BufferTracker::Buffer* buffer);
+
+ // Free and remove buffer if no async upload in progress. If in progress,
+ // unmanage the buffer and free and destroy when upload completed.
+ void DisposeTransferBuffer(BufferTracker::Buffer* buffer);
+
+ // Used for keeping track of async upload buffers.
+ void CheckBuffersPendingAsyncComplete();
+
+ // Internal async upload query.
+ void BeginQueryAsyncPixelUnpackCompleted(BufferTracker::Buffer *buffer);
+ void EndQueryAsyncPixelUnpackCompleted();
+
bool GetBoundPixelTransferBuffer(
GLenum target, const char* function_name, GLuint* buffer_id);
BufferTracker::Buffer* GetBoundPixelUnpackTransferBufferIfValid(
@@ -699,8 +714,11 @@ class GLES2_IMPL_EXPORT GLES2Implementation
scoped_ptr<QueryTracker> query_tracker_;
QueryTracker::Query* current_query_;
+ QueryTracker::Query* current_private_unpack_query_;
scoped_ptr<BufferTracker> buffer_tracker_;
+ typedef std::list<BufferTracker::Buffer*> BufferList;
+ BufferList released_buffers_pending_async_complete_;
scoped_ptr<GpuMemoryBufferTracker> gpu_memory_buffer_tracker_;

Powered by Google App Engine
This is Rietveld 408576698