Remove pointless Display.clear()
It served no meaningful purpose and it had bugs. So let's remove it rather than try to fix it.
This commit is contained in:
@@ -60,8 +60,6 @@ export default class Display {
|
||||
|
||||
Log.Debug("User Agent: " + navigator.userAgent);
|
||||
|
||||
this.clear();
|
||||
|
||||
// Check canvas features
|
||||
if (!('createImageData' in this._drawCtx)) {
|
||||
throw new Error("Canvas does not support createImageData");
|
||||
@@ -301,12 +299,6 @@ export default class Display {
|
||||
}
|
||||
}
|
||||
|
||||
clear() {
|
||||
this.resize(240, 20);
|
||||
this._drawCtx.clearRect(0, 0, this._fb_width, this._fb_height);
|
||||
this.flip();
|
||||
}
|
||||
|
||||
pending() {
|
||||
return this._renderQ.length > 0;
|
||||
}
|
||||
|
||||
@@ -172,7 +172,6 @@ export default class RFB extends EventTargetMixin {
|
||||
throw exc;
|
||||
}
|
||||
this._display.onflush = this._onFlush.bind(this);
|
||||
this._display.clear();
|
||||
|
||||
this._keyboard = new Keyboard(this._canvas);
|
||||
this._keyboard.onkeyevent = this._handleKeyEvent.bind(this);
|
||||
|
||||
Reference in New Issue
Block a user