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

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

Issue 23440046: Remove dependency on Skia from chromoting client. (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"
11 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
12 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h"
11 13
12 namespace remoting { 14 namespace remoting {
13 15
14 // Video decoder implementations that decodes video packet encoded by 16 // Video decoder implementations that decodes video packet encoded by
15 // VideoEncoderVerbatim. It just copies data from incoming packets to the 17 // VideoEncoderVerbatim. It just copies data from incoming packets to the
16 // video frames. 18 // video frames.
17 class VideoDecoderVerbatim : public VideoDecoder { 19 class VideoDecoderVerbatim : public VideoDecoder {
18 public: 20 public:
19 virtual ~VideoDecoderVerbatim(); 21 virtual ~VideoDecoderVerbatim();
20 22
21 VideoDecoderVerbatim(); 23 VideoDecoderVerbatim();
22 24
23 // VideoDecoder implementation. 25 // VideoDecoder implementation.
24 virtual bool IsReadyForData() OVERRIDE; 26 virtual bool IsReadyForData() OVERRIDE;
25 virtual void Initialize(const SkISize& screen_size) OVERRIDE; 27 virtual void Initialize(const webrtc::DesktopSize& screen_size) OVERRIDE;
26 virtual DecodeResult DecodePacket(const VideoPacket* packet) OVERRIDE; 28 virtual DecodeResult DecodePacket(const VideoPacket* packet) OVERRIDE;
27 virtual VideoPacketFormat::Encoding Encoding() OVERRIDE; 29 virtual VideoPacketFormat::Encoding Encoding() OVERRIDE;
28 virtual void Invalidate(const SkISize& view_size, 30 virtual void Invalidate(const webrtc::DesktopSize& view_size,
29 const SkRegion& region) OVERRIDE; 31 const webrtc::DesktopRegion& region) OVERRIDE;
30 virtual void RenderFrame(const SkISize& view_size, 32 virtual void RenderFrame(const webrtc::DesktopSize& view_size,
31 const SkIRect& clip_area, 33 const webrtc::DesktopRect& clip_area,
32 uint8* image_buffer, 34 uint8* image_buffer,
33 int image_stride, 35 int image_stride,
34 SkRegion* output_region) OVERRIDE; 36 webrtc::DesktopRegion* output_region) OVERRIDE;
35 virtual const SkRegion* GetImageShape() OVERRIDE; 37 virtual const webrtc::DesktopRegion* GetImageShape() OVERRIDE;
36 38
37 private: 39 private:
38 // The region updated that hasn't been copied to the screen yet. 40 // The region updated that hasn't been copied to the screen yet.
39 SkRegion updated_region_; 41 webrtc::DesktopRegion updated_region_;
40 42
41 // Size of the remote screen. 43 // Size of the remote screen.
42 SkISize screen_size_; 44 webrtc::DesktopSize screen_size_;
43 45
44 // The bitmap holding the remote screen bits. 46 // The bitmap holding the remote screen bits.
45 scoped_ptr<uint8[]> screen_buffer_; 47 scoped_ptr<uint8[]> screen_buffer_;
46 48
47 DISALLOW_COPY_AND_ASSIGN(VideoDecoderVerbatim); 49 DISALLOW_COPY_AND_ASSIGN(VideoDecoderVerbatim);
48 }; 50 };
49 51
50 } // namespace remoting 52 } // namespace remoting
51 53
52 #endif // REMOTING_CODEC_VIDEO_DECODER_VERBATIM_H_ 54 #endif // REMOTING_CODEC_VIDEO_DECODER_VERBATIM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698