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

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

Issue 1864723003: Make lost context and error message callbacks on GpuControl go to client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: errorcallback: gputestexpect Created 4 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
(...skipping 11 matching lines...) Expand all
22 22
23 namespace base { 23 namespace base {
24 class Lock; 24 class Lock;
25 } 25 }
26 26
27 namespace gfx { 27 namespace gfx {
28 class GpuMemoryBuffer; 28 class GpuMemoryBuffer;
29 } 29 }
30 30
31 namespace gpu { 31 namespace gpu {
32 class GpuControlClient;
32 struct SyncToken; 33 struct SyncToken;
33 34
34 // Common interface for GpuControl implementations. 35 // Common interface for GpuControl implementations.
35 class GPU_EXPORT GpuControl { 36 class GPU_EXPORT GpuControl {
36 public: 37 public:
37 GpuControl() {} 38 GpuControl() {}
38 virtual ~GpuControl() {} 39 virtual ~GpuControl() {}
39 40
41 virtual void SetGpuControlClient(GpuControlClient* gpu_control_client) = 0;
42
40 virtual Capabilities GetCapabilities() = 0; 43 virtual Capabilities GetCapabilities() = 0;
41 44
42 // Create an image for a client buffer with the given dimensions and 45 // Create an image for a client buffer with the given dimensions and
43 // format. Returns its ID or -1 on error. 46 // format. Returns its ID or -1 on error.
44 virtual int32_t CreateImage(ClientBuffer buffer, 47 virtual int32_t CreateImage(ClientBuffer buffer,
45 size_t width, 48 size_t width,
46 size_t height, 49 size_t height,
47 unsigned internalformat) = 0; 50 unsigned internalformat) = 0;
48 51
49 // Destroy an image. The ID must be positive. 52 // Destroy an image. The ID must be positive.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // be enqueued first so does not need to be flushed. 112 // be enqueued first so does not need to be flushed.
110 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; 113 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0;
111 114
112 private: 115 private:
113 DISALLOW_COPY_AND_ASSIGN(GpuControl); 116 DISALLOW_COPY_AND_ASSIGN(GpuControl);
114 }; 117 };
115 118
116 } // namespace gpu 119 } // namespace gpu
117 120
118 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ 121 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698