| Index: content/browser/gpu/gpu_internals_ui.cc
|
| diff --git a/content/browser/gpu/gpu_internals_ui.cc b/content/browser/gpu/gpu_internals_ui.cc
|
| index c30afe09621e4dde6d2c4af7da5ec1ec8ce58289..51250bb0c1074b9ff11258519243792be7131d32 100644
|
| --- a/content/browser/gpu/gpu_internals_ui.cc
|
| +++ b/content/browser/gpu/gpu_internals_ui.cc
|
| @@ -19,6 +19,7 @@
|
| #include "base/strings/stringprintf.h"
|
| #include "base/sys_info.h"
|
| #include "base/values.h"
|
| +#include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
|
| #include "content/browser/gpu/compositor_util.h"
|
| #include "content/browser/gpu/gpu_data_manager_impl.h"
|
| #include "content/grit/content_resources.h"
|
| @@ -232,6 +233,26 @@ base::DictionaryValue* GpuInfoAsDictionaryValue() {
|
| return info;
|
| }
|
|
|
| +base::DictionaryValue* GmbInfoAsDictionaryValue() {
|
| + base::ListValue* gmb_info = new base::ListValue();
|
| + gmb_info->Append(NewDescriptionValuePair("Native Formats", "Usage"));
|
| +
|
| + BrowserGpuMemoryBufferManager* gmb_manager =
|
| + BrowserGpuMemoryBufferManager::current();
|
| + GpuMemoryBufferConfigurationList list =
|
| + gmb_manager->GetNativeGpuMemoryBufferEnabledAndSupported();
|
| +
|
| + GpuMemoryBufferConfigurationList::iterator it;
|
| + for (it = list.begin(); it != list.end(); it++)
|
| + gmb_info->Append(NewDescriptionValuePair(
|
| + BufferFormatToString(it->first), BufferUsageToString(it->second)));
|
| +
|
| + base::DictionaryValue* info = new base::DictionaryValue();
|
| + info->Set("gmb_info", gmb_info);
|
| +
|
| + return info;
|
| +}
|
| +
|
| // This class receives javascript messages from the renderer.
|
| // Note that the WebUI infrastructure runs on the UI thread, therefore all of
|
| // this class's methods are expected to run on the UI thread.
|
| @@ -409,6 +430,17 @@ void GpuMessageHandler::OnGpuInfoUpdate() {
|
| // Send GPU Info to javascript.
|
| web_ui()->CallJavascriptFunction("browserBridge.onGpuInfoUpdate",
|
| *(gpu_info_val.get()));
|
| +
|
| + // Get GpuMemoryBuffer Info.
|
| + scoped_ptr<base::DictionaryValue> gmb_info_val(GmbInfoAsDictionaryValue());
|
| +
|
| + // Add in blacklisting features
|
| + base::DictionaryValue* gmb_status = new base::DictionaryValue;
|
| + gmb_info_val->Set("gbmStatus", gmb_status);
|
| +
|
| + // Send GMB Info to javascript.
|
| + web_ui()->CallJavascriptFunction("browserBridge.onGmbInfoUpdate",
|
| + *(gmb_info_val.get()));
|
| }
|
|
|
| void GpuMessageHandler::OnGpuSwitched() {
|
|
|