renderer/internal: stop using box pointers
in favor of const refs
This commit is contained in:
parent
16aeb24bc1
commit
e951011503
32 changed files with 252 additions and 264 deletions
|
|
@ -766,18 +766,18 @@ void CMonitor::addDamage(const pixman_region32_t* rg) {
|
|||
g_pCompositor->scheduleFrameForMonitor(self.lock(), Aquamarine::IOutput::AQ_SCHEDULE_DAMAGE);
|
||||
}
|
||||
|
||||
void CMonitor::addDamage(const CRegion* rg) {
|
||||
addDamage(const_cast<CRegion*>(rg)->pixman());
|
||||
void CMonitor::addDamage(const CRegion& rg) {
|
||||
addDamage(const_cast<CRegion*>(&rg)->pixman());
|
||||
}
|
||||
|
||||
void CMonitor::addDamage(const CBox* box) {
|
||||
void CMonitor::addDamage(const CBox& box) {
|
||||
static auto PZOOMFACTOR = CConfigValue<Hyprlang::FLOAT>("cursor:zoom_factor");
|
||||
if (*PZOOMFACTOR != 1.f && g_pCompositor->getMonitorFromCursor() == self) {
|
||||
damage.damageEntire();
|
||||
g_pCompositor->scheduleFrameForMonitor(self.lock(), Aquamarine::IOutput::AQ_SCHEDULE_DAMAGE);
|
||||
}
|
||||
|
||||
if (damage.damage(*box))
|
||||
if (damage.damage(box))
|
||||
g_pCompositor->scheduleFrameForMonitor(self.lock(), Aquamarine::IOutput::AQ_SCHEDULE_DAMAGE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -166,8 +166,8 @@ class CMonitor {
|
|||
void onDisconnect(bool destroy = false);
|
||||
bool applyMonitorRule(SMonitorRule* pMonitorRule, bool force = false);
|
||||
void addDamage(const pixman_region32_t* rg);
|
||||
void addDamage(const CRegion* rg);
|
||||
void addDamage(const CBox* box);
|
||||
void addDamage(const CRegion& rg);
|
||||
void addDamage(const CBox& box);
|
||||
bool shouldSkipScheduleFrameOnMouseEvent();
|
||||
void setMirror(const std::string&);
|
||||
bool isMirror();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue