Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 : atexit_manager_(), | 85 : atexit_manager_(), |
| 86 sync_point_manager_(new SyncPointManager(false)), | 86 sync_point_manager_(new SyncPointManager(false)), |
| 87 sync_point_order_data_(SyncPointOrderData::Create()), | 87 sync_point_order_data_(SyncPointOrderData::Create()), |
| 88 mailbox_manager_(new gles2::MailboxManagerImpl), | 88 mailbox_manager_(new gles2::MailboxManagerImpl), |
| 89 share_group_(new gl::GLShareGroup), | 89 share_group_(new gl::GLShareGroup), |
| 90 surface_(new gl::GLSurfaceStub), | 90 surface_(new gl::GLSurfaceStub), |
| 91 context_(new gl::GLContextStub(share_group_.get())), | 91 context_(new gl::GLContextStub(share_group_.get())), |
| 92 command_buffer_id_(CommandBufferId::FromUnsafeValue(1)) { | 92 command_buffer_id_(CommandBufferId::FromUnsafeValue(1)) { |
| 93 logging::SetMinLogLevel(logging::LOG_FATAL); | 93 logging::SetMinLogLevel(logging::LOG_FATAL); |
| 94 base::CommandLine::Init(0, NULL); | 94 base::CommandLine::Init(0, NULL); |
| 95 gpu_preferences_.enable_unsafe_es3_apis = true; | 95 gpu_preferences_.enable_es3_apis = true; |
|
piman
2016/11/03 21:58:29
nit: you made it the default, so that's not needed
Kai Ninomiya
2016/11/03 22:10:06
Done.
| |
| 96 | 96 |
| 97 gl::GLSurfaceTestSupport::InitializeOneOffWithMockBindings(); | 97 gl::GLSurfaceTestSupport::InitializeOneOffWithMockBindings(); |
| 98 | 98 |
| 99 api_.set_version("OpenGL ES 3.1"); | 99 api_.set_version("OpenGL ES 3.1"); |
| 100 api_.set_extensions(kExtensions); | 100 api_.set_extensions(kExtensions); |
| 101 gl::SetStubGLApi(&api_); | 101 gl::SetStubGLApi(&api_); |
| 102 | 102 |
| 103 sync_point_client_ = sync_point_manager_->CreateSyncPointClient( | 103 sync_point_client_ = sync_point_manager_->CreateSyncPointClient( |
| 104 sync_point_order_data_, CommandBufferNamespace::IN_PROCESS, | 104 sync_point_order_data_, CommandBufferNamespace::IN_PROCESS, |
| 105 command_buffer_id_); | 105 command_buffer_id_); |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 | 292 |
| 293 static gpu::CommandBufferSetup& GetSetup() { | 293 static gpu::CommandBufferSetup& GetSetup() { |
| 294 static gpu::CommandBufferSetup setup; | 294 static gpu::CommandBufferSetup setup; |
| 295 return setup; | 295 return setup; |
| 296 } | 296 } |
| 297 | 297 |
| 298 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { | 298 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
| 299 GetSetup().RunCommandBuffer(data, size); | 299 GetSetup().RunCommandBuffer(data, size); |
| 300 return 0; | 300 return 0; |
| 301 } | 301 } |
| OLD | NEW |