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

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

Issue 117233006: Port content::GLHelper over to GLES2Interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: NULL-check gl->GetString(GL_EXTENSIONS) Created 6 years, 11 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 | « content/common/gpu/client/gl_helper.cc ('k') | content/common/gpu/client/gl_helper_scaling.h » ('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 // 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
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
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 }
OLDNEW
« no previous file with comments | « content/common/gpu/client/gl_helper.cc ('k') | content/common/gpu/client/gl_helper_scaling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698