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

Side by Side Diff: cc/test/cc_test_suite.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: compile3 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
« no previous file with comments | « no previous file | cc/test/layer_tree_pixel_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "cc/test/cc_test_suite.h" 5 #include "cc/test/cc_test_suite.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/threading/thread_id_name_manager.h" 8 #include "base/threading/thread_id_name_manager.h"
9 #include "cc/test/paths.h" 9 #include "cc/test/paths.h"
10 #include "ui/gl/gl_surface.h"
10 11
11 namespace cc { 12 namespace cc {
12 13
13 CCTestSuite::CCTestSuite(int argc, char** argv) 14 CCTestSuite::CCTestSuite(int argc, char** argv)
14 : base::TestSuite(argc, argv) {} 15 : base::TestSuite(argc, argv) {}
15 16
16 CCTestSuite::~CCTestSuite() {} 17 CCTestSuite::~CCTestSuite() {}
17 18
18 void CCTestSuite::Initialize() { 19 void CCTestSuite::Initialize() {
19 base::TestSuite::Initialize(); 20 base::TestSuite::Initialize();
21 gfx::GLSurface::InitializeOneOffForTests();
20 CCPaths::RegisterPathProvider(); 22 CCPaths::RegisterPathProvider();
21 23
22 message_loop_.reset(new base::MessageLoop); 24 message_loop_.reset(new base::MessageLoop);
23 25
24 base::ThreadIdNameManager::GetInstance()->SetName( 26 base::ThreadIdNameManager::GetInstance()->SetName(
25 base::PlatformThread::CurrentId(), 27 base::PlatformThread::CurrentId(),
26 "Main"); 28 "Main");
27 } 29 }
28 30
29 void CCTestSuite::Shutdown() { 31 void CCTestSuite::Shutdown() {
30 message_loop_.reset(); 32 message_loop_.reset();
31 33
32 base::TestSuite::Shutdown(); 34 base::TestSuite::Shutdown();
33 } 35 }
34 36
35 } // namespace cc 37 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/test/layer_tree_pixel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698