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

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: webview fix Created 5 years, 4 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 3efa9857a4a3d967ebd889b0847b0191267816d2..651f600a8c867029c11a396e220467367ce9ecc9 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,10 @@ 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.
+ void ScheduleDelayedWork(base::TimeDelta delay);
bool CheckContextLost();
void CheckCompleteWaits();
@@ -284,7 +284,7 @@ class GpuCommandBufferStub
std::deque<uint32> sync_points_;
int sync_point_wait_count_;
- bool delayed_work_scheduled_;
+ base::TimeTicks process_delayed_work_time_;
uint64 previous_messages_processed_;
base::TimeTicks last_idle_time_;

Powered by Google App Engine
This is Rietveld 408576698