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

Side by Side Diff: content/common/gpu/client/gl_helper_benchmark.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 (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 // This file looks like a unit test, but it contains benchmarks and test 5 // This file looks like a unit test, but it contains benchmarks and test
6 // utilities intended for manual evaluation of the scalers in 6 // utilities intended for manual evaluation of the scalers in
7 // gl_helper*. These tests produce output in the form of files and printouts, 7 // gl_helper*. These tests produce output in the form of files and printouts,
8 // but cannot really "fail". There is no point in making these tests part 8 // but cannot really "fail". There is no point in making these tests part
9 // of any test automation run. 9 // of any test automation run.
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 "fast", 54 "fast",
55 }; 55 };
56 56
57 class GLHelperTest : public testing::Test { 57 class GLHelperTest : public testing::Test {
58 protected: 58 protected:
59 virtual void SetUp() { 59 virtual void SetUp() {
60 WebGraphicsContext3D::Attributes attributes; 60 WebGraphicsContext3D::Attributes attributes;
61 bool lose_context_when_out_of_memory = false; 61 bool lose_context_when_out_of_memory = false;
62 context_ = webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl:: 62 context_ = webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl::
63 CreateOffscreenContext(attributes, lose_context_when_out_of_memory); 63 CreateOffscreenContext(attributes, lose_context_when_out_of_memory);
64 context_->makeContextCurrent(); 64 context_->InitializeOnCurrentThread();
65 65
66 helper_.reset( 66 helper_.reset(
67 new content::GLHelper(context_->GetGLInterface(), 67 new content::GLHelper(context_->GetGLInterface(),
68 context_->GetContextSupport())); 68 context_->GetContextSupport()));
69 helper_scaling_.reset(new content::GLHelperScaling( 69 helper_scaling_.reset(new content::GLHelperScaling(
70 context_->GetGLInterface(), 70 context_->GetGLInterface(),
71 helper_.get())); 71 helper_.get()));
72 } 72 }
73 73
74 virtual void TearDown() { 74 virtual void TearDown() {
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 int main(int argc, char** argv) { 298 int main(int argc, char** argv) {
299 base::CommandLine::Init(argc, argv); 299 base::CommandLine::Init(argc, argv);
300 base::TestSuite* suite = new content::ContentTestSuite(argc, argv); 300 base::TestSuite* suite = new content::ContentTestSuite(argc, argv);
301 #if defined(OS_MACOSX) 301 #if defined(OS_MACOSX)
302 base::mac::ScopedNSAutoreleasePool pool; 302 base::mac::ScopedNSAutoreleasePool pool;
303 #endif 303 #endif
304 gfx::GLSurface::InitializeOneOff(); 304 gfx::GLSurface::InitializeOneOff();
305 305
306 return content::UnitTestTestSuite(suite).Run(); 306 return content::UnitTestTestSuite(suite).Run();
307 } 307 }
OLDNEW
« no previous file with comments | « content/common/gpu/client/context_provider_command_buffer.cc ('k') | content/common/gpu/client/gl_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698