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

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: [WIP] Review comments follow-up Created 6 years, 11 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
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 102bd66abc10a34e5d12223262fc56e59df6b4f0..ce27481a059ec7d0d39e7c8b734bae719a5c7743 100644
--- a/gpu/command_buffer/client/gles2_implementation.h
+++ b/gpu/command_buffer/client/gles2_implementation.h
@@ -591,6 +591,17 @@ 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);
+
+ // Internal async upload query.
+ void BeginInternalQueryAsyncPixelUnpackCompleted(
+ BufferTracker::Buffer *buffer);
+ void EndInternalQueryAsyncPixelUnpackCompleted();
+
+ void MarkPixelTransferBufferLastUsage(BufferTracker::Buffer* buffer);
+
bool GetBoundPixelTransferBuffer(
GLenum target, const char* function_name, GLuint* buffer_id);
BufferTracker::Buffer* GetBoundPixelUnpackTransferBufferIfValid(
@@ -698,7 +709,8 @@ class GLES2_IMPL_EXPORT GLES2Implementation
scoped_refptr<ShareGroup> share_group_;
scoped_ptr<QueryTracker> query_tracker_;
- typedef std::map<GLuint, QueryTracker::Query*> QueryMap;
+ typedef std::pair<GLuint, bool> QueryKey;
+ typedef std::map<QueryKey, QueryTracker::Query*> QueryMap;
QueryMap current_queries_;
scoped_ptr<BufferTracker> buffer_tracker_;

Powered by Google App Engine
This is Rietveld 408576698