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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.h

Issue 1315713007: gpu: Reduce GL context switches used to check pending queries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 3 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: content/common/gpu/gpu_command_buffer_stub.h
diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h
index ed4724388ca7403be0717f4bb3f7f2c48c304565..3e26fcb116e66f97444617716b8bb8b74c81ddfe 100644
--- a/content/common/gpu/gpu_command_buffer_stub.h
+++ b/content/common/gpu/gpu_command_buffer_stub.h
@@ -11,6 +11,7 @@
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
+#include "base/time/time.h"
#include "content/common/content_export.h"
#include "content/common/gpu/gpu_memory_manager.h"
#include "content/common/gpu/gpu_memory_manager_client.h"
@@ -231,11 +232,13 @@ class GpuCommandBufferStub
// Poll the command buffer to execute work.
void PollWork();
+ void PerformWork();
- // Whether this command buffer needs to be polled again in the future.
- bool HasMoreWork();
-
- void ScheduleDelayedWork(int64 delay);
+ // Schedule processing of delayed work. This updates the time at which
+ // delayed work should be processed. |process_delayed_work_time_| is
+ // updated to current time + delay. Call this after processing some amount
+ // of delayed work.
+ void ScheduleDelayedWork(base::TimeDelta delay);
bool CheckContextLost();
void CheckCompleteWaits();
@@ -284,7 +287,7 @@ class GpuCommandBufferStub
std::deque<uint32> sync_points_;
int sync_point_wait_count_;
- bool delayed_work_scheduled_;
+ base::TimeTicks process_delayed_work_time_;
uint32_t previous_processed_num_;
base::TimeTicks last_idle_time_;
« no previous file with comments | « android_webview/browser/deferred_gpu_command_service.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698