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

Side by Side Diff: gpu/command_buffer/tests/gl_manager.h

Issue 1542513002: Switch to standard integer types in gpu/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_TESTS_GL_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_
7 7
8 #include <stddef.h>
9 #include <stdint.h>
10
8 #include "base/containers/scoped_ptr_hash_map.h" 11 #include "base/containers/scoped_ptr_hash_map.h"
9 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
11 #include "gpu/command_buffer/client/gpu_control.h" 14 #include "gpu/command_buffer/client/gpu_control.h"
12 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 15 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
13 #include "gpu/command_buffer/service/feature_info.h" 16 #include "gpu/command_buffer/service/feature_info.h"
14 #include "ui/gfx/geometry/size.h" 17 #include "ui/gfx/geometry/size.h"
15 #include "ui/gfx/gpu_memory_buffer.h" 18 #include "ui/gfx/gpu_memory_buffer.h"
16 19
17 namespace base { 20 namespace base {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 109 }
107 110
108 gfx::GLContext* context() { 111 gfx::GLContext* context() {
109 return context_.get(); 112 return context_.get();
110 } 113 }
111 114
112 const gpu::gles2::FeatureInfo::Workarounds& workarounds() const; 115 const gpu::gles2::FeatureInfo::Workarounds& workarounds() const;
113 116
114 // GpuControl implementation. 117 // GpuControl implementation.
115 Capabilities GetCapabilities() override; 118 Capabilities GetCapabilities() override;
116 int32 CreateImage(ClientBuffer buffer, 119 int32_t CreateImage(ClientBuffer buffer,
117 size_t width, 120 size_t width,
118 size_t height, 121 size_t height,
119 unsigned internalformat) override; 122 unsigned internalformat) override;
120 void DestroyImage(int32 id) override; 123 void DestroyImage(int32_t id) override;
121 int32 CreateGpuMemoryBufferImage(size_t width, 124 int32_t CreateGpuMemoryBufferImage(size_t width,
122 size_t height, 125 size_t height,
123 unsigned internalformat, 126 unsigned internalformat,
124 unsigned usage) override; 127 unsigned usage) override;
125 uint32 InsertSyncPoint() override; 128 uint32_t InsertSyncPoint() override;
126 uint32 InsertFutureSyncPoint() override; 129 uint32_t InsertFutureSyncPoint() override;
127 void RetireSyncPoint(uint32 sync_point) override; 130 void RetireSyncPoint(uint32_t sync_point) override;
128 void SignalSyncPoint(uint32 sync_point, 131 void SignalSyncPoint(uint32_t sync_point,
129 const base::Closure& callback) override; 132 const base::Closure& callback) override;
130 void SignalQuery(uint32 query, const base::Closure& callback) override; 133 void SignalQuery(uint32_t query, const base::Closure& callback) override;
131 void SetLock(base::Lock*) override; 134 void SetLock(base::Lock*) override;
132 bool IsGpuChannelLost() override; 135 bool IsGpuChannelLost() override;
133 gpu::CommandBufferNamespace GetNamespaceID() const override; 136 gpu::CommandBufferNamespace GetNamespaceID() const override;
134 uint64_t GetCommandBufferID() const override; 137 uint64_t GetCommandBufferID() const override;
135 int32_t GetExtraCommandBufferData() const override; 138 int32_t GetExtraCommandBufferData() const override;
136 uint64_t GenerateFenceSyncRelease() override; 139 uint64_t GenerateFenceSyncRelease() override;
137 bool IsFenceSyncRelease(uint64_t release) override; 140 bool IsFenceSyncRelease(uint64_t release) override;
138 bool IsFenceSyncFlushed(uint64_t release) override; 141 bool IsFenceSyncFlushed(uint64_t release) override;
139 bool IsFenceSyncFlushReceived(uint64_t release) override; 142 bool IsFenceSyncFlushReceived(uint64_t release) override;
140 void SignalSyncToken(const gpu::SyncToken& sync_token, 143 void SignalSyncToken(const gpu::SyncToken& sync_token,
141 const base::Closure& callback) override; 144 const base::Closure& callback) override;
142 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override; 145 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override;
143 146
144 private: 147 private:
145 void PumpCommands(); 148 void PumpCommands();
146 bool GetBufferChanged(int32 transfer_buffer_id); 149 bool GetBufferChanged(int32_t transfer_buffer_id);
147 void SetupBaseContext(); 150 void SetupBaseContext();
148 void OnFenceSyncRelease(uint64_t release); 151 void OnFenceSyncRelease(uint64_t release);
149 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id, 152 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id,
150 uint64_t command_buffer_id, 153 uint64_t command_buffer_id,
151 uint64_t release); 154 uint64_t release);
152 155
153 SyncPointManager* sync_point_manager_; // Non-owning. 156 SyncPointManager* sync_point_manager_; // Non-owning.
154 157
155 scoped_refptr<SyncPointOrderData> sync_point_order_data_; 158 scoped_refptr<SyncPointOrderData> sync_point_order_data_;
156 scoped_ptr<SyncPointClient> sync_point_client_; 159 scoped_ptr<SyncPointClient> sync_point_client_;
(...skipping 15 matching lines...) Expand all
172 // Used on Android to virtualize GL for all contexts. 175 // Used on Android to virtualize GL for all contexts.
173 static int use_count_; 176 static int use_count_;
174 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; 177 static scoped_refptr<gfx::GLShareGroup>* base_share_group_;
175 static scoped_refptr<gfx::GLSurface>* base_surface_; 178 static scoped_refptr<gfx::GLSurface>* base_surface_;
176 static scoped_refptr<gfx::GLContext>* base_context_; 179 static scoped_refptr<gfx::GLContext>* base_context_;
177 }; 180 };
178 181
179 } // namespace gpu 182 } // namespace gpu
180 183
181 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ 184 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_lose_context_chromium_unittest.cc ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698