OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CLIENT_RECTANGLE_UPDATE_DECODER_H_ | 5 #ifndef REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_ |
6 #define REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_ | 6 #define REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // TODO(wez): Replace the ref-counted proxy with an owned FrameConsumer. | 41 // TODO(wez): Replace the ref-counted proxy with an owned FrameConsumer. |
42 RectangleUpdateDecoder(scoped_refptr<base::MessageLoopProxy> message_loop, | 42 RectangleUpdateDecoder(scoped_refptr<base::MessageLoopProxy> message_loop, |
43 scoped_refptr<FrameConsumerProxy> consumer); | 43 scoped_refptr<FrameConsumerProxy> consumer); |
44 | 44 |
45 // Initializes decoder with the information from the protocol config. | 45 // Initializes decoder with the information from the protocol config. |
46 void Initialize(const protocol::SessionConfig& config); | 46 void Initialize(const protocol::SessionConfig& config); |
47 | 47 |
48 // Decodes the contents of |packet|. DecodePacket may keep a reference to | 48 // Decodes the contents of |packet|. DecodePacket may keep a reference to |
49 // |packet| so the |packet| must remain alive and valid until |done| is | 49 // |packet| so the |packet| must remain alive and valid until |done| is |
50 // executed. | 50 // executed. |
51 void DecodePacket(const VideoPacket* packet, const base::Closure& done); | 51 void DecodePacket(scoped_ptr<VideoPacket> packet, const base::Closure& done); |
52 | 52 |
53 // FrameProducer implementation. These methods may be called before we are | 53 // FrameProducer implementation. These methods may be called before we are |
54 // Initialize()d, or we know the source screen size. | 54 // Initialize()d, or we know the source screen size. |
55 virtual void DrawBuffer(pp::ImageData* buffer) OVERRIDE; | 55 virtual void DrawBuffer(pp::ImageData* buffer) OVERRIDE; |
56 virtual void InvalidateRegion(const SkRegion& region) OVERRIDE; | 56 virtual void InvalidateRegion(const SkRegion& region) OVERRIDE; |
57 virtual void RequestReturnBuffers(const base::Closure& done) OVERRIDE; | 57 virtual void RequestReturnBuffers(const base::Closure& done) OVERRIDE; |
58 virtual void SetOutputSizeAndClip(const SkISize& view_size, | 58 virtual void SetOutputSizeAndClip(const SkISize& view_size, |
59 const SkIRect& clip_area) OVERRIDE; | 59 const SkIRect& clip_area) OVERRIDE; |
60 | 60 |
61 private: | 61 private: |
(...skipping 20 matching lines...) Expand all Loading... |
82 // The drawing buffers supplied by the frame consumer. | 82 // The drawing buffers supplied by the frame consumer. |
83 std::list<pp::ImageData*> buffers_; | 83 std::list<pp::ImageData*> buffers_; |
84 | 84 |
85 // Flag used to coalesce runs of SchedulePaint()s into a single DoPaint(). | 85 // Flag used to coalesce runs of SchedulePaint()s into a single DoPaint(). |
86 bool paint_scheduled_; | 86 bool paint_scheduled_; |
87 }; | 87 }; |
88 | 88 |
89 } // namespace remoting | 89 } // namespace remoting |
90 | 90 |
91 #endif // REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_ | 91 #endif // REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_ |
OLD | NEW |