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

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

Issue 162023002: Reduce internal Flush() in GL resource glGen/Delete APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert lock_ pattern change in IdHandler::FreeIds. Created 6 years, 10 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/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/client/cmd_buffer_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/cmd_buffer_helper.h
diff --git a/gpu/command_buffer/client/cmd_buffer_helper.h b/gpu/command_buffer/client/cmd_buffer_helper.h
index 513e00f69c880d3075e2a7e011f164a88195ba29..825cf9ffbe69702ad0f5394d16b6a9b8c45d9bf0 100644
--- a/gpu/command_buffer/client/cmd_buffer_helper.h
+++ b/gpu/command_buffer/client/cmd_buffer_helper.h
@@ -256,6 +256,8 @@ class GPU_EXPORT CommandBufferHelper {
return ring_buffer_;
}
+ uint32 flush_generation() const { return flush_generation_; }
+
void FreeRingBuffer();
bool HaveRingBuffer() const {
@@ -311,6 +313,10 @@ class GPU_EXPORT CommandBufferHelper {
// Using C runtime instead of base because this file cannot depend on base.
clock_t last_flush_time_;
+ // Incremented every time the helper flushes the command buffer.
+ // Can be used to track when prior commands have been flushed.
+ uint32 flush_generation_;
+
friend class CommandBufferHelperTest;
DISALLOW_COPY_AND_ASSIGN(CommandBufferHelper);
};
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/client/cmd_buffer_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698