changed = changed_;
+ if (!conn->client.useCopyRect)
+ changed.assign_union(copied);
+
/*
* We need to render the cursor seperately as it has its own
* magical pixel buffer, so split it out from the changed region.
conn->writer()->writeFramebufferUpdateStart(nRects);
- writeCopyRects(copied, copyDelta);
+ if (conn->client.useCopyRect)
+ writeCopyRects(copied, copyDelta);
/*
* We start by searching for solid rects, which are then removed
// SimpleUpdateTracker
-SimpleUpdateTracker::SimpleUpdateTracker(bool use_copyrect) {
- copy_enabled = use_copyrect;
+SimpleUpdateTracker::SimpleUpdateTracker() {
}
SimpleUpdateTracker::~SimpleUpdateTracker() {
}
-void SimpleUpdateTracker::enable_copyrect(bool enable) {
- if (!enable && copy_enabled) {
- add_changed(copied);
- copied.clear();
- }
- copy_enabled=enable;
-}
-
void SimpleUpdateTracker::add_changed(const Region ®ion) {
changed.assign_union(region);
}
void SimpleUpdateTracker::add_copied(const Region &dest, const Point &delta) {
- // Do we support copyrect?
- if (!copy_enabled) {
- add_changed(dest);
- return;
- }
-
// Is there anything to do?
if (dest.is_empty()) return;
class SimpleUpdateTracker : public UpdateTracker {
public:
- SimpleUpdateTracker(bool use_copyrect=true);
+ SimpleUpdateTracker();
virtual ~SimpleUpdateTracker();
- virtual void enable_copyrect(bool enable);
-
virtual void add_changed(const Region ®ion);
virtual void add_copied(const Region &dest, const Point &delta);
virtual void subtract(const Region& region);
Region changed;
Region copied;
Point copy_delta;
- bool copy_enabled;
};
}
inProcessMessages(false),
pendingSyncFence(false), syncFence(false), fenceFlags(0),
fenceDataLen(0), fenceData(NULL), congestionTimer(this),
- losslessTimer(this), server(server_), updates(false),
+ losslessTimer(this), server(server_),
updateRenderedCursor(false), removeRenderedCursor(false),
continuousUpdates(false), encodeManager(this), pointerEventTime(0),
clientHasCursor(false),
bool needNewUpdateInfo;
const RenderedCursor *cursor;
- updates.enable_copyrect(client.useCopyRect);
-
// See what the client has requested (if anything)
if (continuousUpdates)
req = cuRegion.union_(requested);