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

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

Issue 2444813002: Remove unsafe mode to enable es3 api by default for WebGL2 and ES3 context (Closed)
Patch Set: remove runtime flag unsafeES3APIs from blink webgl module Created 4 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 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
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( 95 base::CommandLine::ForCurrentProcess()->AppendSwitch(
96 switches::kEnableUnsafeES3APIs); 96 switches::kEnableUnsafeES3APIs);
97 gpu_preferences_.enable_unsafe_es3_apis = true; 97 gpu_preferences_.enable_es3_apis = true;
98 98
99 gl::GLSurfaceTestSupport::InitializeOneOffWithMockBindings(); 99 gl::GLSurfaceTestSupport::InitializeOneOffWithMockBindings();
100 100
101 api_.set_version("OpenGL ES 3.0"); 101 api_.set_version("OpenGL ES 3.0");
102 api_.set_extensions(kExtensions); 102 api_.set_extensions(kExtensions);
103 gl::SetStubGLApi(&api_); 103 gl::SetStubGLApi(&api_);
104 104
105 sync_point_client_ = sync_point_manager_->CreateSyncPointClient( 105 sync_point_client_ = sync_point_manager_->CreateSyncPointClient(
106 sync_point_order_data_, CommandBufferNamespace::IN_PROCESS, 106 sync_point_order_data_, CommandBufferNamespace::IN_PROCESS,
107 command_buffer_id_); 107 command_buffer_id_);
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 294
295 static gpu::CommandBufferSetup& GetSetup() { 295 static gpu::CommandBufferSetup& GetSetup() {
296 static gpu::CommandBufferSetup setup; 296 static gpu::CommandBufferSetup setup;
297 return setup; 297 return setup;
298 } 298 }
299 299
300 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 300 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
301 GetSetup().RunCommandBuffer(data, size); 301 GetSetup().RunCommandBuffer(data, size);
302 return 0; 302 return 0;
303 } 303 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698