diff options
author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-24 02:53:50 +0000 |
---|---|---|
committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-24 02:53:50 +0000 |
commit | bfe3010dd8c3dfc7a62d791bacdc51569ca94055 (patch) | |
tree | b6afadaac6596e4f3435f221a9dfd525c2d43600 /remoting/base/decoder.h | |
parent | 0f514a875652950650f1c51164a62660fac28dc6 (diff) | |
download | chromium_src-bfe3010dd8c3dfc7a62d791bacdc51569ca94055.zip chromium_src-bfe3010dd8c3dfc7a62d791bacdc51569ca94055.tar.gz chromium_src-bfe3010dd8c3dfc7a62d791bacdc51569ca94055.tar.bz2 |
Replace RectVectors with SkRegions in Decoder.
BUG=105401
Review URL: http://codereview.chromium.org/9277001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118790 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/base/decoder.h')
-rw-r--r-- | remoting/base/decoder.h | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/remoting/base/decoder.h b/remoting/base/decoder.h index dd37757..9efc17e 100644 --- a/remoting/base/decoder.h +++ b/remoting/base/decoder.h @@ -1,21 +1,17 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef REMOTING_BASE_DECODER_H_ #define REMOTING_BASE_DECODER_H_ -#include <vector> - #include "base/memory/scoped_ptr.h" #include "media/base/video_frame.h" #include "remoting/proto/video.pb.h" -#include "third_party/skia/include/core/SkRect.h" +#include "third_party/skia/include/core/SkRegion.h" namespace remoting { -typedef std::vector<SkIRect> RectVector; - // Interface for a decoder that takes a stream of bytes from the network and // outputs frames of data. // @@ -42,10 +38,10 @@ class Decoder { // Feeds more data into the decoder. virtual DecodeResult DecodePacket(const VideoPacket* packet) = 0; - // Returns rects that were updated in the last frame. Can be called only + // Returns the region affected by the most recent frame. Can be called only // after DecodePacket returned DECODE_DONE. Caller keeps ownership of - // |rects|. |rects| is kept empty if whole screen needs to be updated. - virtual void GetUpdatedRects(RectVector* rects) = 0; + // |region|. + virtual void GetUpdatedRegion(SkRegion* region) = 0; // Reset the decoder to an uninitialized state. Release all references to // the initialized |frame|. Initialize() must be called before the decoder @@ -65,14 +61,12 @@ class Decoder { // Set the clipping rectangle to the decoder. Decoder should respect this and // only output changes in this rectangle. The new clipping rectangle will be // effective on the next decoded video frame. - // - // When scaling is enabled clipping rectangles are ignored. virtual void SetClipRect(const SkIRect& clip_rect) {} - // Force decoder to output a video frame with content in |rects| using the - // last decoded video frame. |rects| are expressed in video frame rather - // than output coordinates. - virtual void RefreshRects(const RectVector& rects) {} + // Force decoder to output a frame based on the specified |region| of the + // most recently decoded video frame. |region| is expressed in video frame + // rather than output coordinates. + virtual void RefreshRegion(const SkRegion& region) {} }; } // namespace remoting |