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

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: use IsNativeGpuMemoryBufferConfiguration 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
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..41abdc79fbbfd1b58b761be9018404f87c369949 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.gmbInfo_ = data.gmbInfo;
this.clientInfo_ = data.clientInfo;
this.logMessages_ = data.logMessages;
cr.dispatchSimpleEvent(this, 'gpuInfoUpdate');
+ cr.dispatchSimpleEvent(this, 'gmbInfoUpdate');
reveman 2015/10/27 23:20:36 gmb -> gpu_memory_buffer
cr.dispatchSimpleEvent(this, 'clientInfoChange');
cr.dispatchSimpleEvent(this, 'logMessagesChange');
},
@@ -95,6 +97,21 @@ cr.define('gpu', function() {
},
/**
+ * Get gmbInfo data.
+ */
+ get gmbInfo() {
+ return this.gmbInfo_;
+ },
+
+ /**
+ * Called from gpu c++ code when GpuMemoryBuffer Info is updated.
+ */
+ onGmbInfoUpdate: function(gmbInfo) {
+ this.gmbInfo_ = gmbInfo;
+ cr.dispatchSimpleEvent(this, 'gmbInfoUpdate');
+ },
+
+ /**
* This function begins a request for the ClientInfo. If it comes back
* as undefined, then we will issue the request again in 250ms.
*/

Powered by Google App Engine
This is Rietveld 408576698