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

Unified Diff: gpu/ipc/in_process_command_buffer.h

Issue 2806163004: Plumbing input event latency reporting through Mus GPU. (Closed)
Patch Set: Inline LatencyTracker in DIsplayOutputService. Created 3 years, 8 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/ipc/client/command_buffer_proxy_impl.cc ('k') | gpu/ipc/in_process_command_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/in_process_command_buffer.h
diff --git a/gpu/ipc/in_process_command_buffer.h b/gpu/ipc/in_process_command_buffer.h
index ff29663a9254b1e39cedb58ab8a7d0e97745aae2..33fe5526db9574d2f67a2e0f1dc65d116f407ef9 100644
--- a/gpu/ipc/in_process_command_buffer.h
+++ b/gpu/ipc/in_process_command_buffer.h
@@ -81,6 +81,9 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer,
public ImageTransportSurfaceDelegate {
public:
class Service;
+ typedef base::Callback<void(const std::vector<ui::LatencyInfo>&)>
+ LatencyInfoCallback;
+
explicit InProcessCommandBuffer(const scoped_refptr<Service>& service);
~InProcessCommandBuffer() override;
@@ -131,6 +134,8 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer,
const base::Closure& callback) override;
void WaitSyncTokenHint(const SyncToken& sync_token) override;
bool CanWaitUnverifiedSyncToken(const SyncToken& sync_token) override;
+ void AddLatencyInfo(
+ const std::vector<ui::LatencyInfo>& latency_info) override;
// ImageTransportSurfaceDelegate implementation:
#if defined(OS_WIN)
@@ -232,7 +237,8 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer,
bool InitializeOnGpuThread(const InitializeOnGpuThreadParams& params);
void Destroy();
bool DestroyOnGpuThread();
- void FlushOnGpuThread(int32_t put_offset);
+ void FlushOnGpuThread(int32_t put_offset,
+ std::vector<ui::LatencyInfo>* latency_info);
void UpdateLastStateOnGpuThread();
void ScheduleDelayedWorkOnGpuThread();
bool MakeCurrent();
@@ -285,6 +291,11 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer,
bool delayed_work_pending_;
ImageFactory* image_factory_;
+ LatencyInfoCallback latency_info_callback_;
+
+ // Should only be accessed on the client thread.
+ std::unique_ptr<std::vector<ui::LatencyInfo>> latency_info_;
+
// Members accessed on the client thread:
GpuControlClient* gpu_control_client_;
#if DCHECK_IS_ON()
« no previous file with comments | « gpu/ipc/client/command_buffer_proxy_impl.cc ('k') | gpu/ipc/in_process_command_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698