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

Unified Diff: tools/ipc_fuzzer/fuzzer/fuzzer.cc

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 5 years, 1 month 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
« no previous file with comments | « third_party/mojo/src/mojo/public/c/gpu/GLES2/gl2extmojo.h ('k') | ui/aura/bench/bench_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ipc_fuzzer/fuzzer/fuzzer.cc
diff --git a/tools/ipc_fuzzer/fuzzer/fuzzer.cc b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
index 51c5c059ee61b7f491ba4e842eb6239dc69e2f92..193bd92397a8f074ff9ed9551584f426a723fb5e 100644
--- a/tools/ipc_fuzzer/fuzzer/fuzzer.cc
+++ b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
@@ -1199,13 +1199,38 @@ struct FuzzTraits<gpu::Mailbox> {
};
template <>
+struct FuzzTraits<gpu::SyncToken> {
+ static bool Fuzz(gpu::SyncToken* p, Fuzzer* fuzzer) {
+ bool verified_flush = false;
+ gpu::CommandBufferNamespace namespace_id =
+ gpu::CommandBufferNamespace::INVALID;
+ uint64_t command_buffer_id = 0;
+ uint64_t release_count = 0;
+
+ if (!FuzzParam(&verified_flush, fuzzer))
+ return false;
+ if (!FuzzParam(&namespace_id, fuzzer))
+ return false;
+ if (!FuzzParam(&command_buffer_id, fuzzer))
+ return false;
+ if (!FuzzParam(&release_count, fuzzer))
+ return false;
+
+ p->Clear();
+ p->Set(namespace_id, command_buffer_id, release_count);
+ if (verified_flush)
+ p->SetVerifyFlush();
+ }
+};
+
+template <>
struct FuzzTraits<gpu::MailboxHolder> {
static bool Fuzz(gpu::MailboxHolder* p, Fuzzer* fuzzer) {
if (!FuzzParam(&p->mailbox, fuzzer))
return false;
- if (!FuzzParam(&p->texture_target, fuzzer))
+ if (!FuzzParam(&p->sync_token, fuzzer))
return false;
- if (!FuzzParam(&p->sync_point, fuzzer))
+ if (!FuzzParam(&p->texture_target, fuzzer))
return false;
return true;
}
« no previous file with comments | « third_party/mojo/src/mojo/public/c/gpu/GLES2/gl2extmojo.h ('k') | ui/aura/bench/bench_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698