summaryrefslogtreecommitdiffstats
path: root/remoting/base/decoder.h
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-08 03:30:17 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-08 03:30:17 +0000
commitd4d48be8a5e8e71041dad670af0e18d893888e3e (patch)
treea9b53fc091ead9ed740dfba21bdc715fcffff85c /remoting/base/decoder.h
parente7594613917ab0d665abea21aa60701407c2c06e (diff)
downloadchromium_src-d4d48be8a5e8e71041dad670af0e18d893888e3e.zip
chromium_src-d4d48be8a5e8e71041dad670af0e18d893888e3e.tar.gz
chromium_src-d4d48be8a5e8e71041dad670af0e18d893888e3e.tar.bz2
Fix startup race-conditions in new Decoder pipeline:
Fix RectangleUpdateDecoder to cope with rendering requests before it is ready. Fix PepperView not to InitiateDrawing() until initialized. Fix DecoderVp8::RenderFrame() to allow being called before a frame is decoded. Add DCHECKs for screen and view size to DecoderVp8. Clarify requirements on FrameProducer interface implementation in comments. Clarify screen and view size requirements on Decoder interface methods. BUG=116842,116851 Review URL: http://codereview.chromium.org/9624022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125536 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/base/decoder.h')
-rw-r--r--remoting/base/decoder.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/remoting/base/decoder.h b/remoting/base/decoder.h
index dd3d43e..c4cb7fb 100644
--- a/remoting/base/decoder.h
+++ b/remoting/base/decoder.h
@@ -35,6 +35,7 @@ class Decoder {
virtual ~Decoder() {}
// Initializes the decoder and sets the output dimensions.
+ // |screen size| must not be empty.
virtual void Initialize(const SkISize& screen_size) = 0;
// Feeds more data into the decoder.
@@ -45,25 +46,24 @@ class Decoder {
virtual VideoPacketFormat::Encoding Encoding() = 0;
- // Forces the decoder to include the specified |region| the next time
- // RenderFrame() is called. |region| is expressed in output coordinates.
+ // Marks the specified |region| of the view for update the next time
+ // RenderFrame() is called. |region| is expressed in |view_size| coordinates.
+ // |view_size| must not be empty.
virtual void Invalidate(const SkISize& view_size,
const SkRegion& region) = 0;
- // Copies invalidated pixels of the video frame to |image_buffer|. Both
- // decoding a packet or Invalidate() call can result in parts of the frame
- // to be invalidated. Only the pixels within |clip_area| are copied.
- // Invalidated pixels outside of |clip_area| remain invalidated.
+ // Copies invalidated pixels within |clip_area| to |image_buffer|. Pixels are
+ // invalidated either by new data received in DecodePacket(), or by explicit
+ // calls to Invalidate(). |clip_area| is specified in |view_size| coordinates.
+ // If |view_size| differs from the source size then the copied pixels will be
+ // scaled accordingly. |view_size| cannot be empty.
//
- // The routine sets |output_region| to indicate the updated areas of
- // |image_buffer|. |output_region| is in output buffer coordinates.
+ // |image_buffer|'s origin must correspond to the top-left of |clip_area|,
+ // and the buffer must be large enough to hold |clip_area| RGBA32 pixels.
+ // |image_stride| gives the output buffer's stride in pixels.
//
- // |image_buffer| is assumed to be large enough to hold entire |clip_area|
- // (RGBA32). The top left corner of the buffer corresponds to the top left
- // corner of |clip_area|. |image_stride| specifies the size of a single row
- // of the buffer in bytes.
- //
- // Both |clip_area| and |output_region| are expressed in output coordinates.
+ // On return, |output_region| contains the updated area, in |view_size|
+ // coordinates.
virtual void RenderFrame(const SkISize& view_size,
const SkIRect& clip_area,
uint8* image_buffer,