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

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

Issue 686523002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 content::GLHelper::ScalerQuality kQualities[] = { 47 content::GLHelper::ScalerQuality kQualities[] = {
48 content::GLHelper::SCALER_QUALITY_BEST, 48 content::GLHelper::SCALER_QUALITY_BEST,
49 content::GLHelper::SCALER_QUALITY_GOOD, 49 content::GLHelper::SCALER_QUALITY_GOOD,
50 content::GLHelper::SCALER_QUALITY_FAST, }; 50 content::GLHelper::SCALER_QUALITY_FAST, };
51 51
52 const char* kQualityNames[] = {"best", "good", "fast", }; 52 const char* kQualityNames[] = {"best", "good", "fast", };
53 53
54 class GLHelperTest : public testing::Test { 54 class GLHelperTest : public testing::Test {
55 protected: 55 protected:
56 virtual void SetUp() { 56 void SetUp() override {
57 WebGraphicsContext3D::Attributes attributes; 57 WebGraphicsContext3D::Attributes attributes;
58 bool lose_context_when_out_of_memory = false; 58 bool lose_context_when_out_of_memory = false;
59 context_ = 59 context_ =
60 WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( 60 WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext(
61 attributes, lose_context_when_out_of_memory); 61 attributes, lose_context_when_out_of_memory);
62 context_->InitializeOnCurrentThread(); 62 context_->InitializeOnCurrentThread();
63 context_support_ = context_->GetContextSupport(); 63 context_support_ = context_->GetContextSupport();
64 helper_.reset( 64 helper_.reset(
65 new content::GLHelper(context_->GetGLInterface(), context_support_)); 65 new content::GLHelper(context_->GetGLInterface(), context_support_));
66 helper_scaling_.reset(new content::GLHelperScaling( 66 helper_scaling_.reset(new content::GLHelperScaling(
67 context_->GetGLInterface(), helper_.get())); 67 context_->GetGLInterface(), helper_.get()));
68 } 68 }
69 69
70 virtual void TearDown() { 70 void TearDown() override {
71 helper_scaling_.reset(NULL); 71 helper_scaling_.reset(NULL);
72 helper_.reset(NULL); 72 helper_.reset(NULL);
73 context_.reset(NULL); 73 context_.reset(NULL);
74 } 74 }
75 75
76 void StartTracing(const std::string& filter) { 76 void StartTracing(const std::string& filter) {
77 base::debug::TraceLog::GetInstance()->SetEnabled( 77 base::debug::TraceLog::GetInstance()->SetEnabled(
78 base::debug::CategoryFilter(filter), 78 base::debug::CategoryFilter(filter),
79 base::debug::TraceLog::RECORDING_MODE, 79 base::debug::TraceLog::RECORDING_MODE,
80 base::debug::TraceOptions( 80 base::debug::TraceOptions(
(...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1958 base::CommandLine::Init(argc, argv); 1958 base::CommandLine::Init(argc, argv);
1959 base::TestSuite* suite = new content::ContentTestSuite(argc, argv); 1959 base::TestSuite* suite = new content::ContentTestSuite(argc, argv);
1960 #if defined(OS_MACOSX) 1960 #if defined(OS_MACOSX)
1961 base::mac::ScopedNSAutoreleasePool pool; 1961 base::mac::ScopedNSAutoreleasePool pool;
1962 #endif 1962 #endif
1963 1963
1964 content::UnitTestTestSuite runner(suite); 1964 content::UnitTestTestSuite runner(suite);
1965 base::MessageLoop message_loop; 1965 base::MessageLoop message_loop;
1966 return runner.Run(); 1966 return runner.Run();
1967 } 1967 }
OLDNEW
« no previous file with comments | « content/common/gpu/client/gl_helper_benchmark.cc ('k') | content/common/gpu/client/gpu_in_process_context_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698