(int width, int height,
PixelFormat pf, String name)
| 406 | // serverInit() is called when the ServerInit message is received. The |
| 407 | // derived class must call on to CConnection::serverInit(). |
| 408 | public void serverInit(int width, int height, |
| 409 | PixelFormat pf, String name) |
| 410 | { |
| 411 | super.serverInit(width, height, pf, name); |
| 412 | |
| 413 | state_ = stateEnum.RFBSTATE_NORMAL; |
| 414 | vlog.debug("Initialisation done"); |
| 415 | |
| 416 | initDone(); |
| 417 | assert(framebuffer != null); |
| 418 | // FIXME: even if the client is scaling? |
| 419 | assert(framebuffer.width() == server.width()); |
| 420 | assert(framebuffer.height() == server.height()); |
| 421 | |
| 422 | // We want to make sure we call SetEncodings at least once |
| 423 | encodingChange = true; |
| 424 | |
| 425 | requestNewUpdate(); |
| 426 | |
| 427 | // This initial update request is a bit of a corner case, so we need |
| 428 | // to help out setting the correct format here. |
| 429 | if (pendingPFChange) { |
| 430 | server.setPF(pendingPF); |
| 431 | pendingPFChange = false; |
| 432 | } |
| 433 | } |
| 434 | |
| 435 | public void readAndDecodeRect(Rect r, int encoding, |
| 436 | ModifiablePixelBuffer pb) |
no test coverage detected