diff options
author | Sergiusz Bazanski <q3k@q3k.org> | 2018-07-14 18:50:50 +0100 |
---|---|---|
committer | Sergiusz Bazanski <q3k@q3k.org> | 2018-07-14 18:50:50 +0100 |
commit | 36b4e3382dc552fcd1b078bdd246dc14379394a1 (patch) | |
tree | dfd8c295328e7452eaec3158b98bd7b153668dcd /ice40 | |
parent | 836d8c1ef3295a34c591324ef4c8ec48687279ee (diff) | |
download | nextpnr-36b4e3382dc552fcd1b078bdd246dc14379394a1.tar.gz nextpnr-36b4e3382dc552fcd1b078bdd246dc14379394a1.tar.bz2 nextpnr-36b4e3382dc552fcd1b078bdd246dc14379394a1.zip |
Revert "Make GUI nice and smooth."
This reverts commit a8c84e90a39c54174dd24b5b76bd17aed8311481.
Diffstat (limited to 'ice40')
-rw-r--r-- | ice40/arch.cc | 10 | ||||
-rw-r--r-- | ice40/arch.h | 8 | ||||
-rw-r--r-- | ice40/main.cc | 3 |
3 files changed, 6 insertions, 15 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc index 547dbcd6..af6e922c 100644 --- a/ice40/arch.cc +++ b/ice40/arch.cc @@ -534,8 +534,9 @@ DecalXY Arch::getGroupDecal(GroupId group) const return decalxy; }; -std::vector<GraphicElement> ArchRProxyMethods::getDecalGraphics(DecalId decal) const +std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const { + boost::shared_lock_guard<boost::shared_mutex> lock(mtx_); std::vector<GraphicElement> ret; if (decal.type == DecalId::TYPE_FRAME) { @@ -567,7 +568,7 @@ std::vector<GraphicElement> ArchRProxyMethods::getDecalGraphics(DecalId decal) c BelId bel; bel.index = decal.index; - auto bel_type = parent_->getBelType(bel); + auto bel_type = getBelType(bel); if (bel_type == TYPE_ICESTORM_LC) { GraphicElement el; @@ -953,9 +954,4 @@ CellInfo *ArchRWProxyMethods::getCell(IdString cell) return parent_->cells.at(cell).get(); } -UIUpdatesRequired ArchRWProxyMethods::getUIUpdatesRequired(void) -{ - return parent_->getUIUpdatesRequired(); -} - NEXTPNR_NAMESPACE_END diff --git a/ice40/arch.h b/ice40/arch.h index 4311f4a5..da1e583a 100644 --- a/ice40/arch.h +++ b/ice40/arch.h @@ -604,6 +604,8 @@ public: // ------------------------------------------------- + std::vector<GraphicElement> getDecalGraphics(DecalId decal) const; + DecalXY getFrameDecal() const; DecalXY getBelDecal(BelId bel) const; DecalXY getWireDecal(WireId wire) const; @@ -689,8 +691,6 @@ public: IdString getBoundBelCell(BelId bel) const; BelId getBelByName(IdString name) const; - - std::vector<GraphicElement> getDecalGraphics(DecalId decal) const; }; // A proxy object that keeps an Arch shared/readonly lock until it goes out @@ -750,10 +750,6 @@ public: void bindBel(BelId bel, IdString cell, PlaceStrength strength); // Returned pointer is valid as long as Proxy object exists. CellInfo *getCell(IdString cell); - - - // Methods to be used by UI for detecting whether we need to redraw. - UIUpdatesRequired getUIUpdatesRequired(void); }; // A proxy object that keeps an Arch readwrite lock until it goes out of scope. diff --git a/ice40/main.cc b/ice40/main.cc index d38c786c..e77bdd34 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -51,8 +51,7 @@ void svg_dump_decal(const Context *ctx, const DecalXY &decal) const float scale = 10.0, offset = 10.0; const std::string style = "stroke=\"black\" stroke-width=\"0.1\" fill=\"none\""; - auto &&proxy = ctx->rproxy(); - for (auto &el : proxy.getDecalGraphics(decal.decal)) { + for (auto &el : ctx->getDecalGraphics(decal.decal)) { if (el.type == GraphicElement::G_BOX) { std::cout << "<rect x=\"" << (offset + scale * (decal.x + el.x1)) << "\" y=\"" << (offset + scale * (decal.y + el.y1)) << "\" height=\"" << (scale * (el.y2 - el.y1)) |