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

Side by Side Diff: gpu/command_buffer/client/gpu_control.h

Issue 2771053003: WIP: Plumbing input event latency reporting through Mus GPU.
Patch Set: NON_EXPORTED_BASE 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "gpu/command_buffer/common/capabilities.h" 15 #include "gpu/command_buffer/common/capabilities.h"
16 #include "gpu/command_buffer/common/command_buffer_id.h" 16 #include "gpu/command_buffer/common/command_buffer_id.h"
17 #include "gpu/command_buffer/common/constants.h" 17 #include "gpu/command_buffer/common/constants.h"
18 #include "gpu/command_buffer/common/mailbox.h" 18 #include "gpu/command_buffer/common/mailbox.h"
19 #include "gpu/gpu_export.h" 19 #include "gpu/gpu_export.h"
20 20
21 extern "C" typedef struct _ClientBuffer* ClientBuffer; 21 extern "C" typedef struct _ClientBuffer* ClientBuffer;
22 22
23 namespace base { 23 namespace base {
24 class Lock; 24 class Lock;
25 } 25 }
26 26
27 namespace ui {
28 class LatencyInfo;
29 }
30
27 namespace gpu { 31 namespace gpu {
28 class GpuControlClient; 32 class GpuControlClient;
29 struct SyncToken; 33 struct SyncToken;
30 34
31 // Common interface for GpuControl implementations. 35 // Common interface for GpuControl implementations.
32 class GPU_EXPORT GpuControl { 36 class GPU_EXPORT GpuControl {
33 public: 37 public:
34 GpuControl() {} 38 GpuControl() {}
35 virtual ~GpuControl() {} 39 virtual ~GpuControl() {}
36 40
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // example, the WaitSyncToken command is used to pull texture updates when 112 // example, the WaitSyncToken command is used to pull texture updates when
109 // used in conjunction with MailboxManagerSync. 113 // used in conjunction with MailboxManagerSync.
110 virtual void WaitSyncTokenHint(const SyncToken& sync_token) = 0; 114 virtual void WaitSyncTokenHint(const SyncToken& sync_token) = 0;
111 115
112 // Under some circumstances a sync token may be used which has not been 116 // Under some circumstances a sync token may be used which has not been
113 // verified to have been flushed. For example, fence syncs queued on the same 117 // verified to have been flushed. For example, fence syncs queued on the same
114 // channel as the wait command guarantee that the fence sync will be enqueued 118 // channel as the wait command guarantee that the fence sync will be enqueued
115 // first so does not need to be flushed. 119 // first so does not need to be flushed.
116 virtual bool CanWaitUnverifiedSyncToken(const SyncToken& sync_token) = 0; 120 virtual bool CanWaitUnverifiedSyncToken(const SyncToken& sync_token) = 0;
117 121
122 // Add |latency_info| to be reported and augumented with GPU latency
123 // components next time there is a GPU buffer swap.
124 virtual void AddLatencyInfo(
125 const std::vector<ui::LatencyInfo>& latency_info) = 0;
126
118 private: 127 private:
119 DISALLOW_COPY_AND_ASSIGN(GpuControl); 128 DISALLOW_COPY_AND_ASSIGN(GpuControl);
120 }; 129 };
121 130
122 } // namespace gpu 131 } // namespace gpu
123 132
124 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ 133 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | gpu/command_buffer/tests/gl_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698