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

Unified Diff: gpu/command_buffer/tests/fuzzer_main.cc

Issue 2752393002: gpu: Add SequenceId for identifying sync point sequences. (Closed)
Patch Set: piman's review 3 Created 3 years, 9 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
« no previous file with comments | « gpu/command_buffer/service/sync_point_manager_unittest.cc ('k') | gpu/command_buffer/tests/gl_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/fuzzer_main.cc
diff --git a/gpu/command_buffer/tests/fuzzer_main.cc b/gpu/command_buffer/tests/fuzzer_main.cc
index 2fb7e3243225d62027a6eaafadd394e83cb8115c..1c10efdaab911ce158e464f14fc04e13827a5748 100644
--- a/gpu/command_buffer/tests/fuzzer_main.cc
+++ b/gpu/command_buffer/tests/fuzzer_main.cc
@@ -89,7 +89,7 @@ class CommandBufferSetup {
CommandBufferSetup()
: atexit_manager_(),
sync_point_manager_(new SyncPointManager()),
- sync_point_order_data_(SyncPointOrderData::Create()),
+ sync_point_order_data_(sync_point_manager_->CreateSyncPointOrderData()),
mailbox_manager_(new gles2::MailboxManagerImpl),
share_group_(new gl::GLShareGroup),
command_buffer_id_(CommandBufferId::FromUnsafeValue(1)) {
@@ -120,9 +120,9 @@ class CommandBufferSetup {
gl::GLSurfaceTestSupport::InitializeOneOffWithMockBindings();
#endif
- sync_point_client_ = base::MakeUnique<SyncPointClient>(
- sync_point_manager_.get(), sync_point_order_data_,
- CommandBufferNamespace::IN_PROCESS, command_buffer_id_);
+ sync_point_client_state_ = sync_point_manager_->CreateSyncPointClientState(
+ CommandBufferNamespace::IN_PROCESS, command_buffer_id_,
+ sync_point_order_data_->sequence_id());
translator_cache_ = new gles2::ShaderTranslatorCache(gpu_preferences_);
completeness_cache_ = new gles2::FramebufferCompletenessCache;
@@ -187,11 +187,14 @@ class CommandBufferSetup {
}
~CommandBufferSetup() {
- sync_point_client_ = nullptr;
if (sync_point_order_data_) {
sync_point_order_data_->Destroy();
sync_point_order_data_ = nullptr;
}
+ if (sync_point_client_state_) {
+ sync_point_client_state_->Destroy();
+ sync_point_client_state_ = nullptr;
+ }
}
void RunCommandBuffer(const uint8_t* data, size_t size) {
@@ -223,8 +226,8 @@ class CommandBufferSetup {
return;
}
- uint32_t order_num = sync_point_order_data_->GenerateUnprocessedOrderNumber(
- sync_point_manager_.get());
+ uint32_t order_num =
+ sync_point_order_data_->GenerateUnprocessedOrderNumber();
sync_point_order_data_->BeginProcessingOrderNumber(order_num);
executor_->PutChanged();
@@ -237,8 +240,8 @@ class CommandBufferSetup {
}
void OnFenceSyncRelease(uint64_t release) {
- CHECK(sync_point_client_);
- sync_point_client_->ReleaseFenceSync(release);
+ CHECK(sync_point_client_state_);
+ sync_point_client_state_->ReleaseFenceSync(release);
}
bool OnWaitSyncToken(const SyncToken& sync_token) {
@@ -275,7 +278,7 @@ class CommandBufferSetup {
std::unique_ptr<SyncPointManager> sync_point_manager_;
scoped_refptr<SyncPointOrderData> sync_point_order_data_;
- std::unique_ptr<SyncPointClient> sync_point_client_;
+ scoped_refptr<SyncPointClientState> sync_point_client_state_;
scoped_refptr<gles2::MailboxManager> mailbox_manager_;
scoped_refptr<gl::GLShareGroup> share_group_;
const gpu::CommandBufferId command_buffer_id_;
« no previous file with comments | « gpu/command_buffer/service/sync_point_manager_unittest.cc ('k') | gpu/command_buffer/tests/gl_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698