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

Side by Side Diff: remoting/client/frame_producer.h

Issue 9331003: Improving the decoder pipeline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Redesigned FrameConsumer/FrameProducer. Created 8 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_CLIENT_FRAME_PRODUCER_H_
6 #define REMOTING_CLIENT_FRAME_PRODUCER_H_
7
8 #include "base/callback_forward.h"
9 #include "third_party/skia/include/core/SkRect.h"
10 #include "third_party/skia/include/core/SkRegion.h"
11 #include "third_party/skia/include/core/SkSize.h"
12
13 namespace pp {
14 class ImageData;
15 } // namespace pp
16
17 namespace remoting {
18
19 class FrameProducer {
20 public:
21 FrameProducer() {}
22 virtual ~FrameProducer() {}
23
24 // This routine drains the queue returning all pending buffers to
25 // the consumer.
26 virtual void DrainQueue(const base::Closure& done) = 0;
27
28 // This routine submits an image buffer for subsequent drawing. Once any part
29 // of the frame within the clipping area is invalidated, the producer copies
30 // the updated pixels to one of the pending buffers and return it to
31 // the consumer via the FrameConsumer::PaintBuffer() call.
32 //
33 // The passed buffer must be large enough to hold the whole clipping area.
34 virtual void EnqueueBuffer(pp::ImageData* buffer) = 0;
35
36 // The frame consumer can call this routine requesting the frame to be
37 // repainted. The specified region of the frame is will be invalided.
38 // The region is given in client's coordinates relative to the beginning of
39 // the frame.
40 virtual void Invalidate(const SkRegion& region) = 0;
41
42 // The frame consumer calls this function to notify the producer about view
43 // area changes. This can result in producer immediately returning some of or
44 // all enqueued buffers to the consumer for reuse or reallocation.
45 virtual void SetView(const SkISize& view_size, const SkIRect& clip_area) = 0;
46
47 private:
48 DISALLOW_COPY_AND_ASSIGN(FrameProducer);
49 };
50
51 } // namespace remoting
52
53 #endif // REMOTING_CLIENT_FRAME_PRODUCER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698