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

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

Issue 17447007: Change WGC3DInProcessCBImpl factories to return a base class pointer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 (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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 const char *kQualityNames[] = { 55 const char *kQualityNames[] = {
56 "best", 56 "best",
57 "good", 57 "good",
58 "fast", 58 "fast",
59 }; 59 };
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_.reset( 65 context_ = webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl::
66 webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl:: 66 CreateOffscreenContext(attributes);
67 CreateOffscreenContext(attributes));
68 context_->makeContextCurrent(); 67 context_->makeContextCurrent();
69 68
70 helper_.reset(new content::GLHelper(context_.get())); 69 helper_.reset(new content::GLHelper(context_.get()));
71 helper_scaling_.reset(new content::GLHelperScaling( 70 helper_scaling_.reset(new content::GLHelperScaling(
72 context_.get(), 71 context_.get(),
73 helper_.get())); 72 helper_.get()));
74 } 73 }
75 74
76 virtual void TearDown() { 75 virtual void TearDown() {
77 helper_scaling_.reset(NULL); 76 helper_scaling_.reset(NULL);
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 #if defined(OS_MACOSX) 313 #if defined(OS_MACOSX)
315 base::mac::ScopedNSAutoreleasePool pool; 314 base::mac::ScopedNSAutoreleasePool pool;
316 #endif 315 #endif
317 #if defined(TOOLKIT_GTK) 316 #if defined(TOOLKIT_GTK)
318 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); 317 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess());
319 #endif 318 #endif
320 gfx::GLSurface::InitializeOneOff(); 319 gfx::GLSurface::InitializeOneOff();
321 320
322 return content::UnitTestTestSuite(suite).Run(); 321 return content::UnitTestTestSuite(suite).Run();
323 } 322 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/image_transport_factory_android.cc ('k') | content/common/gpu/client/gl_helper_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698