Commit c8162c67 authored by asargent@chromium.org's avatar asargent@chromium.org

Revert 72180 - Collect GL_EXTENSIONS string in GPUInfo and display it in about:gpu page.

BUG=none
TEST=GL_EXTENSIONS showing in about:gpu

Review URL: http://codereview.chromium.org/6306008

TBR=zmo@google.com
Review URL: http://codereview.chromium.org/6324008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72182 0039d316-1c4b-4281-b951-d872f2087c98
parent cefc2241
...@@ -295,8 +295,6 @@ DictionaryValue* GpuInfoToDict(const GPUInfo& gpu_info) { ...@@ -295,8 +295,6 @@ DictionaryValue* GpuInfoToDict(const GPUInfo& gpu_info) {
gpu_info.gl_renderer())); gpu_info.gl_renderer()));
basic_info->Append(NewDescriptionValuePair("GL_VERSION", basic_info->Append(NewDescriptionValuePair("GL_VERSION",
gpu_info.gl_version_string())); gpu_info.gl_version_string()));
basic_info->Append(NewDescriptionValuePair("GL_EXTENSIONS",
gpu_info.gl_extensions()));
DictionaryValue* info = new DictionaryValue(); DictionaryValue* info = new DictionaryValue();
info->Set("basic_info", basic_info); info->Set("basic_info", basic_info);
......
...@@ -16,7 +16,6 @@ GPUInfo::GPUInfo() ...@@ -16,7 +16,6 @@ GPUInfo::GPUInfo()
gl_version_string_(""), gl_version_string_(""),
gl_vendor_(""), gl_vendor_(""),
gl_renderer_(""), gl_renderer_(""),
gl_extensions_(""),
can_lose_context_(false) { can_lose_context_(false) {
} }
...@@ -68,10 +67,6 @@ std::string GPUInfo::gl_renderer() const { ...@@ -68,10 +67,6 @@ std::string GPUInfo::gl_renderer() const {
return gl_renderer_; return gl_renderer_;
} }
std::string GPUInfo::gl_extensions() const {
return gl_extensions_;
}
bool GPUInfo::can_lose_context() const { bool GPUInfo::can_lose_context() const {
return can_lose_context_; return can_lose_context_;
} }
...@@ -118,10 +113,6 @@ void GPUInfo::SetGLRenderer(const std::string& gl_renderer) { ...@@ -118,10 +113,6 @@ void GPUInfo::SetGLRenderer(const std::string& gl_renderer) {
gl_renderer_ = gl_renderer; gl_renderer_ = gl_renderer;
} }
void GPUInfo::SetGLExtensions(const std::string& gl_extensions) {
gl_extensions_ = gl_extensions;
}
void GPUInfo::SetCanLoseContext(bool can_lose_context) { void GPUInfo::SetCanLoseContext(bool can_lose_context) {
can_lose_context_ = can_lose_context; can_lose_context_ = can_lose_context;
} }
......
...@@ -79,10 +79,6 @@ class GPUInfo { ...@@ -79,10 +79,6 @@ class GPUInfo {
// Return "" if we are not using OpenGL. // Return "" if we are not using OpenGL.
std::string gl_renderer() const; std::string gl_renderer() const;
// Return the GL_EXTENSIONS string.
// Return "" if we are not using OpenGL.
std::string gl_extensions() const;
// Return the device semantics, i.e. whether the Vista and Windows 7 specific // Return the device semantics, i.e. whether the Vista and Windows 7 specific
// semantics are available. // semantics are available.
bool can_lose_context() const; bool can_lose_context() const;
...@@ -107,8 +103,6 @@ class GPUInfo { ...@@ -107,8 +103,6 @@ class GPUInfo {
void SetGLRenderer(const std::string& gl_renderer); void SetGLRenderer(const std::string& gl_renderer);
void SetGLExtensions(const std::string& gl_extensions);
void SetCanLoseContext(bool can_lose_context); void SetCanLoseContext(bool can_lose_context);
#if defined(OS_WIN) #if defined(OS_WIN)
...@@ -131,7 +125,6 @@ class GPUInfo { ...@@ -131,7 +125,6 @@ class GPUInfo {
std::string gl_version_string_; std::string gl_version_string_;
std::string gl_vendor_; std::string gl_vendor_;
std::string gl_renderer_; std::string gl_renderer_;
std::string gl_extensions_;
bool can_lose_context_; bool can_lose_context_;
#if defined(OS_WIN) #if defined(OS_WIN)
......
...@@ -20,6 +20,5 @@ TEST(GPUInfoBasicTest, EmptyGPUInfo) { ...@@ -20,6 +20,5 @@ TEST(GPUInfoBasicTest, EmptyGPUInfo) {
EXPECT_EQ(gpu_info.gl_version_string(), ""); EXPECT_EQ(gpu_info.gl_version_string(), "");
EXPECT_EQ(gpu_info.gl_vendor(), ""); EXPECT_EQ(gpu_info.gl_vendor(), "");
EXPECT_EQ(gpu_info.gl_renderer(), ""); EXPECT_EQ(gpu_info.gl_renderer(), "");
EXPECT_EQ(gpu_info.gl_extensions(), "");
EXPECT_EQ(gpu_info.can_lose_context(), false); EXPECT_EQ(gpu_info.can_lose_context(), false);
} }
...@@ -140,7 +140,6 @@ void ParamTraits<GPUInfo> ::Write(Message* m, const param_type& p) { ...@@ -140,7 +140,6 @@ void ParamTraits<GPUInfo> ::Write(Message* m, const param_type& p) {
WriteParam(m, p.gl_version_string()); WriteParam(m, p.gl_version_string());
WriteParam(m, p.gl_vendor()); WriteParam(m, p.gl_vendor());
WriteParam(m, p.gl_renderer()); WriteParam(m, p.gl_renderer());
WriteParam(m, p.gl_extensions());
WriteParam(m, p.can_lose_context()); WriteParam(m, p.can_lose_context());
#if defined(OS_WIN) #if defined(OS_WIN)
...@@ -161,7 +160,6 @@ bool ParamTraits<GPUInfo> ::Read(const Message* m, void** iter, param_type* p) { ...@@ -161,7 +160,6 @@ bool ParamTraits<GPUInfo> ::Read(const Message* m, void** iter, param_type* p) {
std::string gl_version_string; std::string gl_version_string;
std::string gl_vendor; std::string gl_vendor;
std::string gl_renderer; std::string gl_renderer;
std::string gl_extensions;
bool can_lose_context; bool can_lose_context;
bool ret = ReadParam(m, iter, &progress); bool ret = ReadParam(m, iter, &progress);
ret = ret && ReadParam(m, iter, &initialization_time); ret = ret && ReadParam(m, iter, &initialization_time);
...@@ -175,7 +173,6 @@ bool ParamTraits<GPUInfo> ::Read(const Message* m, void** iter, param_type* p) { ...@@ -175,7 +173,6 @@ bool ParamTraits<GPUInfo> ::Read(const Message* m, void** iter, param_type* p) {
ret = ret && ReadParam(m, iter, &gl_version_string); ret = ret && ReadParam(m, iter, &gl_version_string);
ret = ret && ReadParam(m, iter, &gl_vendor); ret = ret && ReadParam(m, iter, &gl_vendor);
ret = ret && ReadParam(m, iter, &gl_renderer); ret = ret && ReadParam(m, iter, &gl_renderer);
ret = ret && ReadParam(m, iter, &gl_extensions);
ret = ret && ReadParam(m, iter, &can_lose_context); ret = ret && ReadParam(m, iter, &can_lose_context);
p->SetProgress(static_cast<GPUInfo::Progress>(progress)); p->SetProgress(static_cast<GPUInfo::Progress>(progress));
if (!ret) if (!ret)
...@@ -189,7 +186,6 @@ bool ParamTraits<GPUInfo> ::Read(const Message* m, void** iter, param_type* p) { ...@@ -189,7 +186,6 @@ bool ParamTraits<GPUInfo> ::Read(const Message* m, void** iter, param_type* p) {
p->SetGLVersionString(gl_version_string); p->SetGLVersionString(gl_version_string);
p->SetGLVendor(gl_vendor); p->SetGLVendor(gl_vendor);
p->SetGLRenderer(gl_renderer); p->SetGLRenderer(gl_renderer);
p->SetGLExtensions(gl_extensions);
p->SetCanLoseContext(can_lose_context); p->SetCanLoseContext(can_lose_context);
#if defined(OS_WIN) #if defined(OS_WIN)
......
...@@ -22,7 +22,6 @@ TEST(GPUIPCMessageTest, GPUInfo) { ...@@ -22,7 +22,6 @@ TEST(GPUIPCMessageTest, GPUInfo) {
input.SetGLVersionString("3.2.0 NVIDIA 195.36.24"); input.SetGLVersionString("3.2.0 NVIDIA 195.36.24");
input.SetGLVendor("NVIDIA Corporation"); input.SetGLVendor("NVIDIA Corporation");
input.SetGLRenderer("Quadro FX 380/PCI/SSE2"); input.SetGLRenderer("Quadro FX 380/PCI/SSE2");
input.SetGLExtensions("GL_ARB_texture_rg GL_ARB_window_pos");
input.SetCanLoseContext(false); input.SetCanLoseContext(false);
IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
...@@ -44,7 +43,6 @@ TEST(GPUIPCMessageTest, GPUInfo) { ...@@ -44,7 +43,6 @@ TEST(GPUIPCMessageTest, GPUInfo) {
EXPECT_EQ(input.gl_version_string(), output.gl_version_string()); EXPECT_EQ(input.gl_version_string(), output.gl_version_string());
EXPECT_EQ(input.gl_vendor(), output.gl_vendor()); EXPECT_EQ(input.gl_vendor(), output.gl_vendor());
EXPECT_EQ(input.gl_renderer(), output.gl_renderer()); EXPECT_EQ(input.gl_renderer(), output.gl_renderer());
EXPECT_EQ(input.gl_extensions(), output.gl_extensions());
EXPECT_EQ(input.can_lose_context(), output.can_lose_context()); EXPECT_EQ(input.can_lose_context(), output.can_lose_context());
std::string log_message; std::string log_message;
......
...@@ -89,7 +89,6 @@ bool CollectGraphicsInfoGL(GPUInfo* gpu_info) { ...@@ -89,7 +89,6 @@ bool CollectGraphicsInfoGL(GPUInfo* gpu_info) {
gpu_info->SetGLRenderer(GetGLString(GL_RENDERER)); gpu_info->SetGLRenderer(GetGLString(GL_RENDERER));
gpu_info->SetGLVendor(GetGLString(GL_VENDOR)); gpu_info->SetGLVendor(GetGLString(GL_VENDOR));
gpu_info->SetGLVersionString(GetGLString(GL_VERSION)); gpu_info->SetGLVersionString(GetGLString(GL_VERSION));
gpu_info->SetGLExtensions(GetGLString(GL_EXTENSIONS));
bool validGLVersionInfo = CollectGLVersionInfo(gpu_info); bool validGLVersionInfo = CollectGLVersionInfo(gpu_info);
bool validVideoCardInfo = CollectVideoCardInfo(gpu_info); bool validVideoCardInfo = CollectVideoCardInfo(gpu_info);
......
...@@ -33,9 +33,6 @@ class GPUInfoCollectorTest : public testing::Test { ...@@ -33,9 +33,6 @@ class GPUInfoCollectorTest : public testing::Test {
const char* gl_vendor = "NVIDIA Corporation"; const char* gl_vendor = "NVIDIA Corporation";
const char* gl_version_string = "3.1.0"; const char* gl_version_string = "3.1.0";
const char* gl_shading_language_version = "1.40 NVIDIA via Cg compiler"; const char* gl_shading_language_version = "1.40 NVIDIA via Cg compiler";
const char* gl_extensions =
"GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 "
"GL_EXT_read_format_bgra";
#elif defined(OS_MACOSX) #elif defined(OS_MACOSX)
const uint32 vendor_id = 0x10de; const uint32 vendor_id = 0x10de;
const uint32 device_id = 0x0640; const uint32 device_id = 0x0640;
...@@ -47,9 +44,6 @@ class GPUInfoCollectorTest : public testing::Test { ...@@ -47,9 +44,6 @@ class GPUInfoCollectorTest : public testing::Test {
const char* gl_vendor = "NVIDIA Corporation"; const char* gl_vendor = "NVIDIA Corporation";
const char* gl_version_string = "2.1 NVIDIA-1.6.18"; const char* gl_version_string = "2.1 NVIDIA-1.6.18";
const char* gl_shading_language_version = "1.20 "; const char* gl_shading_language_version = "1.20 ";
const char* gl_extensions =
"GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 "
"GL_EXT_read_format_bgra";
#else // defined (OS_LINUX) #else // defined (OS_LINUX)
const uint32 vendor_id = 0x10de; const uint32 vendor_id = 0x10de;
const uint32 device_id = 0x0658; const uint32 device_id = 0x0658;
...@@ -61,9 +55,6 @@ class GPUInfoCollectorTest : public testing::Test { ...@@ -61,9 +55,6 @@ class GPUInfoCollectorTest : public testing::Test {
const char* gl_vendor = "NVIDIA Corporation"; const char* gl_vendor = "NVIDIA Corporation";
const char* gl_version_string = "3.2.0 NVIDIA 195.36.24"; const char* gl_version_string = "3.2.0 NVIDIA 195.36.24";
const char* gl_shading_language_version = "1.50 NVIDIA via Cg compiler"; const char* gl_shading_language_version = "1.50 NVIDIA via Cg compiler";
const char* gl_extensions =
"GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 "
"GL_EXT_read_format_bgra";
#endif #endif
test_values_.SetVideoCardInfo(vendor_id, device_id); test_values_.SetVideoCardInfo(vendor_id, device_id);
test_values_.SetDriverInfo(driver_vendor, driver_version); test_values_.SetDriverInfo(driver_vendor, driver_version);
...@@ -76,7 +67,8 @@ class GPUInfoCollectorTest : public testing::Test { ...@@ -76,7 +67,8 @@ class GPUInfoCollectorTest : public testing::Test {
EXPECT_CALL(*gl_, GetString(GL_EXTENSIONS)) EXPECT_CALL(*gl_, GetString(GL_EXTENSIONS))
.WillRepeatedly(Return(reinterpret_cast<const GLubyte*>( .WillRepeatedly(Return(reinterpret_cast<const GLubyte*>(
gl_extensions))); "GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 "
"GL_EXT_read_format_bgra")));
EXPECT_CALL(*gl_, GetString(GL_SHADING_LANGUAGE_VERSION)) EXPECT_CALL(*gl_, GetString(GL_SHADING_LANGUAGE_VERSION))
.WillRepeatedly(Return(reinterpret_cast<const GLubyte*>( .WillRepeatedly(Return(reinterpret_cast<const GLubyte*>(
gl_shading_language_version))); gl_shading_language_version)));
...@@ -161,10 +153,3 @@ TEST_F(GPUInfoCollectorTest, GLVendorGL) { ...@@ -161,10 +153,3 @@ TEST_F(GPUInfoCollectorTest, GLVendorGL) {
EXPECT_EQ(test_values_.gl_vendor(), gl_vendor); EXPECT_EQ(test_values_.gl_vendor(), gl_vendor);
} }
TEST_F(GPUInfoCollectorTest, GLExtensionsGL) {
GPUInfo gpu_info;
gpu_info_collector::CollectGraphicsInfoGL(&gpu_info);
std::string gl_extensions = gpu_info.gl_extensions();
EXPECT_EQ(test_values_.gl_extensions(), gl_extensions);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment