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

Side by Side Diff: content/common/gpu/client/command_buffer_proxy_impl.h

Issue 1581273002: Harden CommandBufferProxyImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Post a task for lost context callback when in a reply Created 4 years, 11 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 (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 CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 gfx::SwapResult result); 200 gfx::SwapResult result);
201 void OnUpdateVSyncParameters(base::TimeTicks timebase, 201 void OnUpdateVSyncParameters(base::TimeTicks timebase,
202 base::TimeDelta interval); 202 base::TimeDelta interval);
203 203
204 // Try to read an updated copy of the state from shared memory. 204 // Try to read an updated copy of the state from shared memory.
205 void TryUpdateState(); 205 void TryUpdateState();
206 206
207 // Updates the highest verified release fence sync. 207 // Updates the highest verified release fence sync.
208 void UpdateVerifiedReleases(uint32_t verified_flush); 208 void UpdateVerifiedReleases(uint32_t verified_flush);
209 209
210 // Loses the context after we received an invalid message from the GPU
211 // process. Will call the lost context callback reentrantly if any.
212 void InvalidGpuMessage();
213
214 // Loses the context after we received an invalid reply from the GPU
215 // process. Will post a task to call the lost context callback if any.
216 void InvalidGpuReply();
217
218 void InvalidGpuReplyOnClientThread();
219
210 // The shared memory area used to update state. 220 // The shared memory area used to update state.
211 gpu::CommandBufferSharedState* shared_state() const; 221 gpu::CommandBufferSharedState* shared_state() const;
212 222
213 base::Lock* lock_; 223 base::Lock* lock_;
214 224
215 // Unowned list of DeletionObservers. 225 // Unowned list of DeletionObservers.
216 base::ObserverList<DeletionObserver> deletion_observers_; 226 base::ObserverList<DeletionObserver> deletion_observers_;
217 227
218 // The last cached state received from the service. 228 // The last cached state received from the service.
219 State last_state_; 229 State last_state_;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 uint32_t next_signal_id_; 261 uint32_t next_signal_id_;
252 SignalTaskMap signal_tasks_; 262 SignalTaskMap signal_tasks_;
253 263
254 gpu::Capabilities capabilities_; 264 gpu::Capabilities capabilities_;
255 265
256 std::vector<ui::LatencyInfo> latency_info_; 266 std::vector<ui::LatencyInfo> latency_info_;
257 267
258 SwapBuffersCompletionCallback swap_buffers_completion_callback_; 268 SwapBuffersCompletionCallback swap_buffers_completion_callback_;
259 UpdateVSyncParametersCallback update_vsync_parameters_completion_callback_; 269 UpdateVSyncParametersCallback update_vsync_parameters_completion_callback_;
260 270
271 base::WeakPtr<CommandBufferProxyImpl> weak_this_;
272 scoped_refptr<base::SequencedTaskRunner> callback_thread_;
273
261 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); 274 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl);
262 }; 275 };
263 276
264 } // namespace content 277 } // namespace content
265 278
266 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 279 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
OLDNEW
« no previous file with comments | « content/common/gpu/client/command_buffer_metrics.cc ('k') | content/common/gpu/client/command_buffer_proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698