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

Unified Diff: ui/gl/gl_osmesa_api_implementation.cc

Issue 1203513004: Respect the disabled extension list during binding initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split extension binding loading from static binding loading; pass enabled extensions Created 5 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 side-by-side diff with in-line comments
Download patch
Index: ui/gl/gl_osmesa_api_implementation.cc
diff --git a/ui/gl/gl_osmesa_api_implementation.cc b/ui/gl/gl_osmesa_api_implementation.cc
index 4fa33c6922ed718950e97b2bc1a29e56717e492f..45663797739883080783b4c3d0f895722a19e5e0 100644
--- a/ui/gl/gl_osmesa_api_implementation.cc
+++ b/ui/gl/gl_osmesa_api_implementation.cc
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <vector>
+
+#include "base/strings/string_split.h"
#include "ui/gl/gl_osmesa_api_implementation.h"
namespace gfx {
@@ -14,6 +17,8 @@ void InitializeStaticGLBindingsOSMESA() {
g_real_osmesa = new RealOSMESAApi();
}
g_real_osmesa->Initialize(&g_driver_osmesa);
+ g_driver_osmesa.InitializeExtensionBindings(
+ g_real_osmesa->GetEnabledExtensions());
g_current_osmesa_context = g_real_osmesa;
}
@@ -57,6 +62,19 @@ void RealOSMESAApi::Initialize(DriverOSMESA* driver) {
InitializeBase(driver);
}
+std::set<std::string> RealOSMESAApi::GetEnabledExtensions() const {
+ std::set<std::string> enabled_extensions;
+
+ std::vector<std::string> platform_extensions_vec;
+ std::string platform_ext = DriverOSMESA::GetPlatformExtensions();
+ base::SplitString(platform_ext, ' ', &platform_extensions_vec);
+
+ enabled_extensions.insert(platform_extensions_vec.begin(),
+ platform_extensions_vec.end());
+
+ return enabled_extensions;
+}
+
TraceOSMESAApi::~TraceOSMESAApi() {
}

Powered by Google App Engine
This is Rietveld 408576698