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

Side by Side Diff: ui/gl/gl_context_stub_with_extensions.cc

Issue 1499793003: Fix classes that have too many virtuals for inline constructors. Base URL: https://chromium.googlesource.com/chromium/src.git@enable-virtuals-as-complexity
Patch Set: Finish fixing the codebase that's accessible from Linux. Created 5 years 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 "ui/gl/gl_context_stub_with_extensions.h" 5 #include "ui/gl/gl_context_stub_with_extensions.h"
6 6
7 namespace gfx { 7 namespace gfx {
8 8
9 GLContextStubWithExtensions::GLContextStubWithExtensions() {}
10
9 void GLContextStubWithExtensions::AddExtensionsString(const char* extensions) { 11 void GLContextStubWithExtensions::AddExtensionsString(const char* extensions) {
10 if (extensions == nullptr) 12 if (extensions == nullptr)
11 return; 13 return;
12 14
13 if (extensions_.size() != 0) 15 if (extensions_.size() != 0)
14 extensions_ += ' '; 16 extensions_ += ' ';
15 extensions_ += extensions; 17 extensions_ += extensions;
16 } 18 }
17 19
18 std::string GLContextStubWithExtensions::GetExtensions() { 20 std::string GLContextStubWithExtensions::GetExtensions() {
19 return extensions_; 21 return extensions_;
20 } 22 }
21 23
22 void GLContextStubWithExtensions::SetGLVersionString(const char* version_str) { 24 void GLContextStubWithExtensions::SetGLVersionString(const char* version_str) {
23 version_str_ = std::string(version_str ? version_str : ""); 25 version_str_ = std::string(version_str ? version_str : "");
24 } 26 }
25 27
26 std::string GLContextStubWithExtensions::GetGLVersion() { 28 std::string GLContextStubWithExtensions::GetGLVersion() {
27 return version_str_; 29 return version_str_;
28 } 30 }
29 31
30 bool GLContextStubWithExtensions::WasAllocatedUsingRobustnessExtension() { 32 bool GLContextStubWithExtensions::WasAllocatedUsingRobustnessExtension() {
31 return HasExtension("GL_ARB_robustness") || 33 return HasExtension("GL_ARB_robustness") ||
32 HasExtension("GL_KHR_robustness") || 34 HasExtension("GL_KHR_robustness") ||
33 HasExtension("GL_EXT_robustness"); 35 HasExtension("GL_EXT_robustness");
34 } 36 }
35 37
36 } // namespace gfx 38 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698