Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: remoting/codec/video_decoder_verbatim.h

Issue 23477059: Simplify VideoEncoder interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_CODEC_VIDEO_DECODER_VERBATIM_H_ 5 #ifndef REMOTING_CODEC_VIDEO_DECODER_VERBATIM_H_
6 #define REMOTING_CODEC_VIDEO_DECODER_VERBATIM_H_ 6 #define REMOTING_CODEC_VIDEO_DECODER_VERBATIM_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "remoting/codec/video_decoder.h" 10 #include "remoting/codec/video_decoder.h"
(...skipping 17 matching lines...) Expand all
28 virtual void Invalidate(const SkISize& view_size, 28 virtual void Invalidate(const SkISize& view_size,
29 const SkRegion& region) OVERRIDE; 29 const SkRegion& region) OVERRIDE;
30 virtual void RenderFrame(const SkISize& view_size, 30 virtual void RenderFrame(const SkISize& view_size,
31 const SkIRect& clip_area, 31 const SkIRect& clip_area,
32 uint8* image_buffer, 32 uint8* image_buffer,
33 int image_stride, 33 int image_stride,
34 SkRegion* output_region) OVERRIDE; 34 SkRegion* output_region) OVERRIDE;
35 virtual const SkRegion* GetImageShape() OVERRIDE; 35 virtual const SkRegion* GetImageShape() OVERRIDE;
36 36
37 private: 37 private:
38 enum State {
39 kUninitialized,
40 kReady,
41 kProcessing,
42 kPartitionDone,
43 kDone,
44 kError,
45 };
46
47 // Helper method. Called from DecodePacket to updated state of the decoder.
48 void UpdateStateForPacket(const VideoPacket* packet);
49
50 // The internal state of the decoder.
51 State state_;
52
53 // Keeps track of the updating rect.
54 SkIRect clip_;
55
56 // The position in the row that we are updating.
57 int row_pos_;
58
59 // The current row in the rect that we are updaing.
60 int row_y_;
61
62 // The region updated that hasn't been copied to the screen yet. 38 // The region updated that hasn't been copied to the screen yet.
63 SkRegion updated_region_; 39 SkRegion updated_region_;
64 40
65 // Size of the remote screen. 41 // Size of the remote screen.
66 SkISize screen_size_; 42 SkISize screen_size_;
67 43
68 // The bitmap holding the remote screen bits. 44 // The bitmap holding the remote screen bits.
69 scoped_ptr<uint8[]> screen_buffer_; 45 scoped_ptr<uint8[]> screen_buffer_;
70 46
71 DISALLOW_COPY_AND_ASSIGN(VideoDecoderVerbatim); 47 DISALLOW_COPY_AND_ASSIGN(VideoDecoderVerbatim);
72 }; 48 };
73 49
74 } // namespace remoting 50 } // namespace remoting
75 51
76 #endif // REMOTING_CODEC_VIDEO_DECODER_VERBATIM_H_ 52 #endif // REMOTING_CODEC_VIDEO_DECODER_VERBATIM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698