MCPcopy Create free account
hub / github.com/apache/cloudstack / _createContext

Method _createContext

systemvm/agent/noVNC/core/decoders/h264.js:263–272  ·  view source on GitHub ↗
(x, y, width, height)

Source from the content-addressed store, hash-verified

261 }
262
263 _createContext(x, y, width, height) {
264 const maxContexts = 64;
265 if (Object.keys(this._contexts).length >= maxContexts) {
266 let oldestContextId = this._findOldestContextId();
267 delete this._contexts[oldestContextId];
268 }
269 let context = new H264Context(width, height);
270 this._contexts[this._contextId(x, y, width, height)] = context;
271 return context;
272 }
273
274 _getContext(x, y, width, height) {
275 let context = this._contexts[this._contextId(x, y, width, height)];

Callers 1

_getContextMethod · 0.95

Calls 3

_findOldestContextIdMethod · 0.95
_contextIdMethod · 0.95
keysMethod · 0.80

Tested by

no test coverage detected