| OLD | NEW |
| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 class GLHelperTest : public testing::Test { | 61 class GLHelperTest : public testing::Test { |
| 62 protected: | 62 protected: |
| 63 virtual void SetUp() { | 63 virtual void SetUp() { |
| 64 WebGraphicsContext3D::Attributes attributes; | 64 WebGraphicsContext3D::Attributes attributes; |
| 65 context_ = webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl:: | 65 context_ = webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl:: |
| 66 CreateOffscreenContext(attributes); | 66 CreateOffscreenContext(attributes); |
| 67 context_->makeContextCurrent(); | 67 context_->makeContextCurrent(); |
| 68 | 68 |
| 69 helper_.reset( | 69 helper_.reset( |
| 70 new content::GLHelper(context_.get(), context_->GetContextSupport())); | 70 new content::GLHelper(context_->GetGLInterface(), |
| 71 context_->GetContextSupport())); |
| 71 helper_scaling_.reset(new content::GLHelperScaling( | 72 helper_scaling_.reset(new content::GLHelperScaling( |
| 72 context_.get(), | 73 context_->GetGLInterface(), |
| 73 helper_.get())); | 74 helper_.get())); |
| 74 } | 75 } |
| 75 | 76 |
| 76 virtual void TearDown() { | 77 virtual void TearDown() { |
| 77 helper_scaling_.reset(NULL); | 78 helper_scaling_.reset(NULL); |
| 78 helper_.reset(NULL); | 79 helper_.reset(NULL); |
| 79 context_.reset(NULL); | 80 context_.reset(NULL); |
| 80 } | 81 } |
| 81 | 82 |
| 82 | 83 |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 #if defined(OS_MACOSX) | 315 #if defined(OS_MACOSX) |
| 315 base::mac::ScopedNSAutoreleasePool pool; | 316 base::mac::ScopedNSAutoreleasePool pool; |
| 316 #endif | 317 #endif |
| 317 #if defined(TOOLKIT_GTK) | 318 #if defined(TOOLKIT_GTK) |
| 318 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); | 319 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); |
| 319 #endif | 320 #endif |
| 320 gfx::GLSurface::InitializeOneOff(); | 321 gfx::GLSurface::InitializeOneOff(); |
| 321 | 322 |
| 322 return content::UnitTestTestSuite(suite).Run(); | 323 return content::UnitTestTestSuite(suite).Run(); |
| 323 } | 324 } |
| OLD | NEW |