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

Unified Diff: content/browser/resources/gpu/browser_bridge.js

Issue 1375663002: Show GpuMemoryBuffer feature in chrome://gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cl formatted and removed "Formats"/"Native usage support" value pair Created 5 years, 2 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
« no previous file with comments | « content/browser/gpu/gpu_internals_ui.cc ('k') | content/browser/resources/gpu/info_view.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/resources/gpu/browser_bridge.js
diff --git a/content/browser/resources/gpu/browser_bridge.js b/content/browser/resources/gpu/browser_bridge.js
index cb4133a3398e7597af92113471021217bf3fcdf9..1cf980fe74cab86c24adcb033b5e29f873f8e962 100644
--- a/content/browser/resources/gpu/browser_bridge.js
+++ b/content/browser/resources/gpu/browser_bridge.js
@@ -36,9 +36,11 @@ cr.define('gpu', function() {
applySimulatedData_: function applySimulatedData(data) {
// set up things according to the simulated data
this.gpuInfo_ = data.gpuInfo;
+ this.gpuMemoryBufferInfo_ = data.gpuMemoryBufferInfo;
this.clientInfo_ = data.clientInfo;
this.logMessages_ = data.logMessages;
cr.dispatchSimpleEvent(this, 'gpuInfoUpdate');
+ cr.dispatchSimpleEvent(this, 'gpuMemoryBufferInfoUpdate');
cr.dispatchSimpleEvent(this, 'clientInfoChange');
cr.dispatchSimpleEvent(this, 'logMessagesChange');
},
@@ -95,6 +97,21 @@ cr.define('gpu', function() {
},
/**
+ * Get gpuMemoryBufferInfo data.
+ */
+ get gpuMemoryBufferInfo() {
+ return this.gpuMemoryBufferInfo_;
+ },
+
+ /**
+ * Called from gpu c++ code when GpuMemoryBuffer Info is updated.
+ */
+ onGpuMemoryBufferInfoUpdate: function(gpuMemoryBufferInfo) {
+ this.gpuMemoryBufferInfo_ = gpuMemoryBufferInfo;
+ cr.dispatchSimpleEvent(this, 'gpuMemoryBufferInfoUpdate');
+ },
+
+ /**
* This function begins a request for the ClientInfo. If it comes back
* as undefined, then we will issue the request again in 250ms.
*/
« no previous file with comments | « content/browser/gpu/gpu_internals_ui.cc ('k') | content/browser/resources/gpu/info_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698