[Spice-devel] [PATCH 1/5] rename red_dispatcher_ functions to red_qxl_

Christophe Fergeau cfergeau at redhat.com
Tue Mar 1 17:06:07 UTC 2016


Hey,

On Mon, Feb 29, 2016 at 01:34:32PM -0600, Jonathon Jongsma wrote:
> Frediano and I talked about this last week and basically agreed on renaming
> RedDispatcher to RedQXL. A little more justification for the rename: 
> 
> There are already a couple other types with Dispatcher in their names:
> Dispatcher and its sub-class MainDispatcher. These classes, as the name implies,
> basically dispatch messages between different threads. The name RedDispatcher
> implies that this type is related to the other Dispatcher classes, but that's
> not really true.

I definitely agree with that, actually I worked on some similar rename a
while back, but never finished it :(

> It does *own* a Dispatcher to enable it to talk to RedWorker,
> but the class itself is really an implementation of QXLInstance.

Hmm, I agree it's an implementation of QXLInstance, but is also
apparently a child class of QXLWorker as

struct RedDispatcher {
    QXLWorker base;
    ...
}
seems to imply. The old patches I have were trying to merge
QXLWorker and RedDispatcher through a little bit of juggling at
allocation time

struct QXLWorkerInternal {
    QXLWorker base;
    QXLWorkerPrivate *private;
}

+ some get_private(QXLWorker *worker) helper.

I'm not saying this is better than the patches which are proposed here,
just trying to discuss how to make all of this clearer :)

Also, QXLInstance is
struct QXLInstance {
    SpiceBaseInstance  base;
    int                id;
    QXLState           *st;
};

with QXLState an internal structure as well (defined in reds.h), and
RedDispatcher/RedQXL is one of the few members of this QXLState
structure. Should they be merged?

> So I think the
> RedDispatcher name introduces confusion and makes it harder to understand the
> structure of the code. I think that justifies a rename.
> 
> Is everybody else OK with the rename?

I'm ok with _a_ rename of RedDispatcher, just wondering whether more
clarifications are needed/if we can avoid introducing yet another name
with QXL in it.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160301/b53071f6/attachment.sig>


More information about the Spice-devel mailing list