summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 21:57:22 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 21:57:22 +0000
commitfdf9926defcc577462b00ce3f851f1902dfba6a2 (patch)
tree3525fb8337b6054cea6196e090fd4e2bf210b0a5 /remoting
parent9102552edde75a0a107f09a4b48a98e12dea393f (diff)
downloadchromium_src-fdf9926defcc577462b00ce3f851f1902dfba6a2.zip
chromium_src-fdf9926defcc577462b00ce3f851f1902dfba6a2.tar.gz
chromium_src-fdf9926defcc577462b00ce3f851f1902dfba6a2.tar.bz2
Modify Chromotocol to have a new RectangleUpdatePacket.
This is a less nested version of UpdateStreamMessage. It will replace after a few more CLs are checked in. BUG=52833 TEST=none. adding new messages doesn't change functionality. Review URL: http://codereview.chromium.org/3352013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60360 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/base/protocol/chromotocol.proto50
1 files changed, 50 insertions, 0 deletions
diff --git a/remoting/base/protocol/chromotocol.proto b/remoting/base/protocol/chromotocol.proto
index fb13330..b3fa848 100644
--- a/remoting/base/protocol/chromotocol.proto
+++ b/remoting/base/protocol/chromotocol.proto
@@ -96,6 +96,54 @@ message UpdateStreamPacketMessage {
optional UpdateStreamEndRect end_rect = 3;
}
+// TODO(ajwong): Determine if these fields should be optional or required.
+message RectangleFormat {
+ // X,Y coordinates (in screen pixels) for origin of this update.
+ required int32 x = 1;
+ required int32 y = 2;
+
+ // Width, height (in screen pixels) for this update.
+ required int32 width = 3;
+ required int32 height = 4;
+
+ // The encoding used for this image update.
+ optional UpdateStreamEncoding encoding = 5 [default = EncodingInvalid];
+
+ // The pixel format of this image.
+ optional PixelFormat pixel_format = 6 [default = PixelFormatRgb24];
+}
+
+message RectangleUpdatePacket {
+ // Bitmasks for use in the flags field below.
+ //
+ // The encoder may fragment one update into multiple packets depending on
+ // how the encoder outputs data. Thus, one update can logically consist of
+ // multiple packets. The FIRST_PACKET and LAST_PACKET flags are used to
+ // indicate the start and end of a logical update. Here are notable
+ // consequences:
+ // * Both FIRST_PACKET and LAST_PACKET may be set if an update is only
+ // one packet long.
+ // * The RectangleFormat is only supplied in a FIRST_PACKET.
+ // * An local update cannot change format between a FIRST_PACKET and
+ // a LAST_PACKET.
+ // * All packets in one logical update must be processed in order, and
+ // packets may not be skipped.
+ enum Flags {
+ FIRST_PACKET = 1;
+ LAST_PACKET = 2;
+ }
+ optional int32 flags = 1 [default = 0];
+
+ // The sequence number of the partial data for updating a rectangle.
+ optional int32 sequence_number = 2 [default = 0];
+
+ // This is provided on the first packet of the rectangle data, when
+ // the sequence_number is 0.
+ optional RectangleFormat format = 3;
+
+ optional bytes encoded_rect = 4;
+}
+
// Defines the message that is sent from the host to the client.
// Only one of these messages should be present.
// NEXT ID: 5
@@ -104,6 +152,8 @@ message ChromotingHostMessage {
optional BeginUpdateStreamMessage begin_update_stream = 2;
optional EndUpdateStreamMessage end_update_stream = 3;
optional UpdateStreamPacketMessage update_stream_packet = 4;
+
+ optional RectangleUpdatePacket rectangle_update = 5;
}
// Defines a keyboard event.