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

Side by Side Diff: content/common/gpu/client/gl_helper_unittests.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
« no previous file with comments | « content/common/gpu/client/gl_helper_benchmark.cc ('k') | ui/aura/bench/bench_main.cc » ('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 #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[] = { 52 const char *kQualityNames[] = {
53 "best", 53 "best",
54 "good", 54 "good",
55 "fast", 55 "fast",
56 }; 56 };
57 57
58 class GLHelperTest : public testing::Test { 58 class GLHelperTest : public testing::Test {
59 protected: 59 protected:
60 virtual void SetUp() { 60 virtual void SetUp() {
61 WebGraphicsContext3D::Attributes attributes; 61 WebGraphicsContext3D::Attributes attributes;
62 context_.reset( 62 context_ = webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl::
63 webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl:: 63 CreateOffscreenContext(attributes);
64 CreateOffscreenContext(attributes));
65 context_->makeContextCurrent(); 64 context_->makeContextCurrent();
66 helper_.reset(new content::GLHelper(context_.get())); 65 helper_.reset(new content::GLHelper(context_.get()));
67 helper_scaling_.reset(new content::GLHelperScaling( 66 helper_scaling_.reset(new content::GLHelperScaling(
68 context_.get(), 67 context_.get(),
69 helper_.get())); 68 helper_.get()));
70 } 69 }
71 70
72 virtual void TearDown() { 71 virtual void TearDown() {
73 helper_scaling_.reset(NULL); 72 helper_scaling_.reset(NULL);
74 helper_.reset(NULL); 73 helper_.reset(NULL);
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 #endif 1245 #endif
1247 #if defined(TOOLKIT_GTK) 1246 #if defined(TOOLKIT_GTK)
1248 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); 1247 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess());
1249 #endif 1248 #endif
1250 gfx::GLSurface::InitializeOneOff(); 1249 gfx::GLSurface::InitializeOneOff();
1251 1250
1252 content::UnitTestTestSuite runner(suite); 1251 content::UnitTestTestSuite runner(suite);
1253 base::MessageLoop message_loop; 1252 base::MessageLoop message_loop;
1254 return runner.Run(); 1253 return runner.Run();
1255 } 1254 }
OLDNEW
« no previous file with comments | « content/common/gpu/client/gl_helper_benchmark.cc ('k') | ui/aura/bench/bench_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698