| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef REMOTING_BASE_DECODER_VERBATIM_H_ | 5 #ifndef REMOTING_BASE_DECODER_VERBATIM_H_ |
| 6 #define REMOTING_BASE_DECODER_VERBATIM_H_ | 6 #define REMOTING_BASE_DECODER_VERBATIM_H_ |
| 7 | 7 |
| 8 #include "remoting/base/decoder.h" | 8 #include "remoting/base/decoder.h" |
| 9 | 9 |
| 10 namespace remoting { | 10 namespace remoting { |
| 11 | 11 |
| 12 class DecoderVerbatim : public Decoder { | 12 class DecoderVerbatim : public Decoder { |
| 13 public: | 13 public: |
| 14 DecoderVerbatim(); | 14 DecoderVerbatim(); |
| 15 | 15 |
| 16 // Decoder implementations. | 16 // Decoder implementations. |
| 17 virtual bool BeginDecode(scoped_refptr<media::VideoFrame> frame, | 17 virtual bool BeginDecode(scoped_refptr<media::VideoFrame> frame, |
| 18 UpdatedRects* update_rects, | 18 UpdatedRects* update_rects, |
| 19 Task* partial_decode_done, | 19 Task* partial_decode_done, |
| 20 Task* decode_done); | 20 Task* decode_done); |
| 21 virtual bool PartialDecode(HostMessage* message); | 21 virtual bool PartialDecode(HostMessage* message); |
| 22 virtual void EndDecode(); | 22 virtual void EndDecode(); |
| 23 | 23 |
| 24 void set_reverse_rows(bool reverse) { reverse_rows_ = reverse; } |
| 25 |
| 24 private: | 26 private: |
| 25 bool HandleBeginRect(HostMessage* message); | 27 bool HandleBeginRect(HostMessage* message); |
| 26 bool HandleRectData(HostMessage* message); | 28 bool HandleRectData(HostMessage* message); |
| 27 bool HandleEndRect(HostMessage* message); | 29 bool HandleEndRect(HostMessage* message); |
| 28 | 30 |
| 29 // The internal state of the decoder. | 31 // The internal state of the decoder. |
| 30 State state_; | 32 State state_; |
| 31 | 33 |
| 32 // Keeps track of the updating rect. | 34 // Keeps track of the updating rect. |
| 33 int rect_x_; | 35 int rect_x_; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 47 // True if we should reverse the rows when copying data into the target | 49 // True if we should reverse the rows when copying data into the target |
| 48 // frame buffer. | 50 // frame buffer. |
| 49 bool reverse_rows_; | 51 bool reverse_rows_; |
| 50 | 52 |
| 51 DISALLOW_COPY_AND_ASSIGN(DecoderVerbatim); | 53 DISALLOW_COPY_AND_ASSIGN(DecoderVerbatim); |
| 52 }; | 54 }; |
| 53 | 55 |
| 54 } // namespace remoting | 56 } // namespace remoting |
| 55 | 57 |
| 56 #endif // REMOTING_BASE_DECODER_VERBATIM_H_ | 58 #endif // REMOTING_BASE_DECODER_VERBATIM_H_ |
| OLD | NEW |