| 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 base::CommandLine::ForCurrentProcess()->AppendSwitch( | |
| 96 switches::kEnableUnsafeES3APIs); | |
| 97 gpu_preferences_.enable_unsafe_es3_apis = true; | 95 gpu_preferences_.enable_unsafe_es3_apis = true; |
| 98 | 96 |
| 99 gl::GLSurfaceTestSupport::InitializeOneOffWithMockBindings(); | 97 gl::GLSurfaceTestSupport::InitializeOneOffWithMockBindings(); |
| 100 | 98 |
| 101 api_.set_version("OpenGL ES 3.1"); | 99 api_.set_version("OpenGL ES 3.1"); |
| 102 api_.set_extensions(kExtensions); | 100 api_.set_extensions(kExtensions); |
| 103 gl::SetStubGLApi(&api_); | 101 gl::SetStubGLApi(&api_); |
| 104 | 102 |
| 105 sync_point_client_ = sync_point_manager_->CreateSyncPointClient( | 103 sync_point_client_ = sync_point_manager_->CreateSyncPointClient( |
| 106 sync_point_order_data_, CommandBufferNamespace::IN_PROCESS, | 104 sync_point_order_data_, CommandBufferNamespace::IN_PROCESS, |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 | 292 |
| 295 static gpu::CommandBufferSetup& GetSetup() { | 293 static gpu::CommandBufferSetup& GetSetup() { |
| 296 static gpu::CommandBufferSetup setup; | 294 static gpu::CommandBufferSetup setup; |
| 297 return setup; | 295 return setup; |
| 298 } | 296 } |
| 299 | 297 |
| 300 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { | 298 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
| 301 GetSetup().RunCommandBuffer(data, size); | 299 GetSetup().RunCommandBuffer(data, size); |
| 302 return 0; | 300 return 0; |
| 303 } | 301 } |
| OLD | NEW |