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

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

Issue 470973002: gpu: Remove WebGraphicsContext3D::makeContextCurrent() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix in unittests Created 6 years, 3 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
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 const char* kQualityNames[] = {"best", "good", "fast", }; 52 const char* kQualityNames[] = {"best", "good", "fast", };
53 53
54 class GLHelperTest : public testing::Test { 54 class GLHelperTest : public testing::Test {
55 protected: 55 protected:
56 virtual void SetUp() { 56 virtual void SetUp() {
57 WebGraphicsContext3D::Attributes attributes; 57 WebGraphicsContext3D::Attributes attributes;
58 bool lose_context_when_out_of_memory = false; 58 bool lose_context_when_out_of_memory = false;
59 context_ = 59 context_ =
60 WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( 60 WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext(
61 attributes, lose_context_when_out_of_memory); 61 attributes, lose_context_when_out_of_memory);
62 context_->makeContextCurrent(); 62 context_->InitializeOnCurrentThread();
63 context_support_ = context_->GetContextSupport(); 63 context_support_ = context_->GetContextSupport();
64 helper_.reset( 64 helper_.reset(
65 new content::GLHelper(context_->GetGLInterface(), context_support_)); 65 new content::GLHelper(context_->GetGLInterface(), context_support_));
66 helper_scaling_.reset(new content::GLHelperScaling( 66 helper_scaling_.reset(new content::GLHelperScaling(
67 context_->GetGLInterface(), helper_.get())); 67 context_->GetGLInterface(), helper_.get()));
68 } 68 }
69 69
70 virtual void TearDown() { 70 virtual void TearDown() {
71 helper_scaling_.reset(NULL); 71 helper_scaling_.reset(NULL);
72 helper_.reset(NULL); 72 helper_.reset(NULL);
(...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after
1954 base::CommandLine::Init(argc, argv); 1954 base::CommandLine::Init(argc, argv);
1955 base::TestSuite* suite = new content::ContentTestSuite(argc, argv); 1955 base::TestSuite* suite = new content::ContentTestSuite(argc, argv);
1956 #if defined(OS_MACOSX) 1956 #if defined(OS_MACOSX)
1957 base::mac::ScopedNSAutoreleasePool pool; 1957 base::mac::ScopedNSAutoreleasePool pool;
1958 #endif 1958 #endif
1959 1959
1960 content::UnitTestTestSuite runner(suite); 1960 content::UnitTestTestSuite runner(suite);
1961 base::MessageLoop message_loop; 1961 base::MessageLoop message_loop;
1962 return runner.Run(); 1962 return runner.Run();
1963 } 1963 }
OLDNEW
« no previous file with comments | « content/common/gpu/client/gl_helper_benchmark.cc ('k') | content/common/gpu/client/gpu_in_process_context_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698