MCPcopy Create free account
hub / github.com/TigerVNC/tigervnc / requestNewUpdate

Method requestNewUpdate

java/com/tigervnc/rfb/CConnection.java:615–657  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

613 // requestNewUpdate() requests an update from the server, having set the
614 // format and encoding appropriately.
615 private void requestNewUpdate()
616 {
617 if (formatChange && !pendingPFChange) {
618 /* Catch incorrect requestNewUpdate calls */
619 assert(!pendingUpdate || continuousUpdates);
620
621 // We have to make sure we switch the internal format at a safe
622 // time. For continuous updates we temporarily disable updates and
623 // look for a EndOfContinuousUpdates message to see when to switch.
624 // For classical updates we just got a new update right before this
625 // function was called, so we need to make sure we finish that
626 // update before we can switch.
627
628 pendingPFChange = true;
629 pendingPF = nextPF;
630
631 if (continuousUpdates)
632 writer().writeEnableContinuousUpdates(false, 0, 0, 0, 0);
633
634 writer().writeSetPixelFormat(pendingPF);
635
636 if (continuousUpdates)
637 writer().writeEnableContinuousUpdates(true, 0, 0,
638 server.width(),
639 server.height());
640 formatChange = false;
641 }
642
643 if (encodingChange) {
644 updateEncodings();
645 encodingChange = false;
646 }
647
648 if (forceNonincremental || !continuousUpdates) {
649 pendingUpdate = true;
650 writer().writeFramebufferUpdateRequest(new Rect(0, 0,
651 server.width(),
652 server.height()),
653 !forceNonincremental);
654 }
655
656 forceNonincremental = false;
657 }
658
659 // Ask for encodings based on which decoders are supported. Assumes higher
660 // encoding numbers are more desirable.

Callers 4

serverInitMethod · 0.95
refreshFramebufferMethod · 0.95

Calls 7

writerMethod · 0.95
updateEncodingsMethod · 0.95
writeSetPixelFormatMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected