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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "gpu/command_buffer/common/capabilities.h" 14 #include "gpu/command_buffer/common/capabilities.h"
15 #include "gpu/command_buffer/common/mailbox.h" 15 #include "gpu/command_buffer/common/mailbox.h"
16 #include "gpu/gpu_export.h" 16 #include "gpu/gpu_export.h"
17 17
18 extern "C" typedef struct _ClientBuffer* ClientBuffer; 18 extern "C" typedef struct _ClientBuffer* ClientBuffer;
19 19
20 namespace base {
21 class Lock;
22 }
23
20 namespace gfx { 24 namespace gfx {
21 class GpuMemoryBuffer; 25 class GpuMemoryBuffer;
22 } 26 }
23 27
24 namespace gpu { 28 namespace gpu {
25 29
26 // Common interface for GpuControl implementations. 30 // Common interface for GpuControl implementations.
27 class GPU_EXPORT GpuControl { 31 class GPU_EXPORT GpuControl {
28 public: 32 public:
29 GpuControl() {} 33 GpuControl() {}
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Runs |callback| when a query created via glCreateQueryEXT() has cleared 72 // Runs |callback| when a query created via glCreateQueryEXT() has cleared
69 // passed the glEndQueryEXT() point. 73 // passed the glEndQueryEXT() point.
70 virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0; 74 virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0;
71 75
72 virtual void SetSurfaceVisible(bool visible) = 0; 76 virtual void SetSurfaceVisible(bool visible) = 0;
73 77
74 // Attaches an external stream to the texture given by |texture_id| and 78 // Attaches an external stream to the texture given by |texture_id| and
75 // returns a stream identifier. 79 // returns a stream identifier.
76 virtual uint32_t CreateStreamTexture(uint32_t texture_id) = 0; 80 virtual uint32_t CreateStreamTexture(uint32_t texture_id) = 0;
77 81
82 // Sets a lock this will be held on every callback from the GPU
83 // implementation. This lock must be set and must be held on every call into
84 // the GPU implementation if it is to be used from multiple threads. This
85 // may not be supported with all implementations.
86 virtual void SetLock(base::Lock*) = 0;
87
78 private: 88 private:
79 DISALLOW_COPY_AND_ASSIGN(GpuControl); 89 DISALLOW_COPY_AND_ASSIGN(GpuControl);
80 }; 90 };
81 91
82 } // namespace gpu 92 } // namespace gpu
83 93
84 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ 94 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h ('k') | gpu/command_buffer/client/program_info_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698