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

Side by Side Diff: gpu/command_buffer/tests/fuzzer_main.cc

Issue 2654993004: Move GPU blacklist calculation to GPU proc (Closed)
Patch Set: fix win clang build Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include <stddef.h> 4 #include <stddef.h>
5 #include <stdint.h> 5 #include <stdint.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 completeness_cache_ = new gles2::FramebufferCompletenessCache; 128 completeness_cache_ = new gles2::FramebufferCompletenessCache;
129 } 129 }
130 130
131 void InitDecoder() { 131 void InitDecoder() {
132 context_->MakeCurrent(surface_.get()); 132 context_->MakeCurrent(surface_.get());
133 scoped_refptr<gles2::FeatureInfo> feature_info = 133 scoped_refptr<gles2::FeatureInfo> feature_info =
134 new gles2::FeatureInfo(); 134 new gles2::FeatureInfo();
135 scoped_refptr<gles2::ContextGroup> context_group = new gles2::ContextGroup( 135 scoped_refptr<gles2::ContextGroup> context_group = new gles2::ContextGroup(
136 gpu_preferences_, mailbox_manager_.get(), nullptr, translator_cache_, 136 gpu_preferences_, mailbox_manager_.get(), nullptr, translator_cache_,
137 completeness_cache_, feature_info, true /* bind_generates_resource */, 137 completeness_cache_, feature_info, true /* bind_generates_resource */,
138 nullptr /* image_factory */, nullptr /* progress_reporter */); 138 nullptr /* image_factory */, nullptr /* progress_reporter */,
139 GpuFeatureInfo());
139 command_buffer_.reset( 140 command_buffer_.reset(
140 new CommandBufferService(context_group->transfer_buffer_manager())); 141 new CommandBufferService(context_group->transfer_buffer_manager()));
141 command_buffer_->SetPutOffsetChangeCallback( 142 command_buffer_->SetPutOffsetChangeCallback(
142 base::Bind(&CommandBufferSetup::PumpCommands, base::Unretained(this))); 143 base::Bind(&CommandBufferSetup::PumpCommands, base::Unretained(this)));
143 command_buffer_->SetGetBufferChangeCallback(base::Bind( 144 command_buffer_->SetGetBufferChangeCallback(base::Bind(
144 &CommandBufferSetup::GetBufferChanged, base::Unretained(this))); 145 &CommandBufferSetup::GetBufferChanged, base::Unretained(this)));
145 InitializeInitialCommandBuffer(); 146 InitializeInitialCommandBuffer();
146 147
147 decoder_.reset(gles2::GLES2Decoder::Create(context_group.get())); 148 decoder_.reset(gles2::GLES2Decoder::Create(context_group.get()));
148 executor_.reset(new CommandExecutor(command_buffer_.get(), decoder_.get(), 149 executor_.reset(new CommandExecutor(command_buffer_.get(), decoder_.get(),
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // registered, causing crashes. 314 // registered, causing crashes.
314 CommandBufferSetup* g_setup = new CommandBufferSetup(); 315 CommandBufferSetup* g_setup = new CommandBufferSetup();
315 316
316 } // anonymous namespace 317 } // anonymous namespace
317 } // namespace gpu 318 } // namespace gpu
318 319
319 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 320 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
320 gpu::g_setup->RunCommandBuffer(data, size); 321 gpu::g_setup->RunCommandBuffer(data, size);
321 return 0; 322 return 0;
322 } 323 }
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698