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

Side by Side Diff: content/common/gpu/client/gl_helper_unittest.cc

Issue 135213003: Ensure GL initialization only happens once, and provide common init path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: initgl: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 4
5 #include <stdio.h> 5 #include <stdio.h>
6 #include <cmath> 6 #include <cmath>
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include <GLES2/gl2.h> 10 #include <GLES2/gl2.h>
(...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after
1534 // need to set it up before we can run the tests. 1534 // need to set it up before we can run the tests.
1535 int main(int argc, char** argv) { 1535 int main(int argc, char** argv) {
1536 CommandLine::Init(argc, argv); 1536 CommandLine::Init(argc, argv);
1537 base::TestSuite* suite = new content::ContentTestSuite(argc, argv); 1537 base::TestSuite* suite = new content::ContentTestSuite(argc, argv);
1538 #if defined(OS_MACOSX) 1538 #if defined(OS_MACOSX)
1539 base::mac::ScopedNSAutoreleasePool pool; 1539 base::mac::ScopedNSAutoreleasePool pool;
1540 #endif 1540 #endif
1541 #if defined(TOOLKIT_GTK) 1541 #if defined(TOOLKIT_GTK)
1542 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); 1542 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess());
1543 #endif 1543 #endif
1544 gfx::GLSurface::InitializeOneOff();
1545 gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess()); 1544 gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess());
1546 1545
1547 content::UnitTestTestSuite runner(suite); 1546 content::UnitTestTestSuite runner(suite);
1548 base::MessageLoop message_loop; 1547 base::MessageLoop message_loop;
1549 return runner.Run(); 1548 return runner.Run();
1550 } 1549 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698