blob: 476eefc0a44223909ce822d5ec52413fa31401e4 [file] [log] [blame]
[email protected]a37d7ff2014-01-17 21:31:001// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "ui/gl/gl_context_stub_with_extensions.h"
6
7namespace gfx {
8
9void GLContextStubWithExtensions::AddExtensionsString(const char* extensions) {
martina.kollarova71b5acd92015-06-01 08:59:0910 if (extensions == nullptr)
[email protected]a37d7ff2014-01-17 21:31:0011 return;
12
13 if (extensions_.size() != 0)
14 extensions_ += ' ';
15 extensions_ += extensions;
16}
17
18std::string GLContextStubWithExtensions::GetExtensions() {
19 return extensions_;
20}
21
22void GLContextStubWithExtensions::SetGLVersionString(const char* version_str) {
23 version_str_ = std::string(version_str ? version_str : "");
24}
25
26std::string GLContextStubWithExtensions::GetGLVersion() {
27 return version_str_;
28}
29
sieversfbaa5dc2015-04-28 00:45:3130bool GLContextStubWithExtensions::WasAllocatedUsingRobustnessExtension() {
31 return HasExtension("GL_ARB_robustness") ||
32 HasExtension("GL_KHR_robustness") ||
33 HasExtension("GL_EXT_robustness");
34}
35
[email protected]a37d7ff2014-01-17 21:31:0036} // namespace gfx