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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/client/command_buffer_proxy_impl.h
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.h b/content/common/gpu/client/command_buffer_proxy_impl.h
index a85b38fc87af93d325033929485f28474b0610a7..17589a7538e39129d46092dacb6a6b3d4daf54d6 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.h
+++ b/content/common/gpu/client/command_buffer_proxy_impl.h
@@ -207,6 +207,16 @@ class CommandBufferProxyImpl
// Updates the highest verified release fence sync.
void UpdateVerifiedReleases(uint32_t verified_flush);
+ // Loses the context after we received an invalid message from the GPU
+ // process. Will call the lost context callback reentrantly if any.
+ void InvalidGpuMessage();
+
+ // Loses the context after we received an invalid reply from the GPU
+ // process. Will post a task to call the lost context callback if any.
+ void InvalidGpuReply();
+
+ void InvalidGpuReplyOnClientThread();
+
// The shared memory area used to update state.
gpu::CommandBufferSharedState* shared_state() const;
@@ -258,6 +268,9 @@ class CommandBufferProxyImpl
SwapBuffersCompletionCallback swap_buffers_completion_callback_;
UpdateVSyncParametersCallback update_vsync_parameters_completion_callback_;
+ base::WeakPtr<CommandBufferProxyImpl> weak_this_;
+ scoped_refptr<base::SequencedTaskRunner> callback_thread_;
+
DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl);
};
« 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