perf(mem): avoid some extra QImage copy

Change-Id: I840d35f05177640513ef159b2a2850f96ec7ab6f
This commit is contained in:
Hualet Wang 2018-07-02 14:05:20 +08:00
parent b2ff74d2f3
commit f6c6a0e700
Notes: gerrit 2018-07-02 14:48:31 +08:00
Verified+1: <jenkins@deepin.com>
Code-Review+2: hualet <mr.asianwang@gmail.com>
Submitted-by: hualet <mr.asianwang@gmail.com>
Submitted-at: Mon, 02 Jul 2018 14:48:31 +0800
Reviewed-on: https://cr.deepin.io/36265
Project: dde/dde-dock
Branch: refs/heads/master
2 changed files with 2 additions and 2 deletions

2
.gitignore vendored
View File

@ -14,7 +14,7 @@
build*/
*.pro.user*
CMakeLists.txt.user
CMakeLists.txt.user*
*.DS_Store
*.qm

View File

@ -148,7 +148,7 @@ void AppSnapshot::fetchSnapshot()
m_snapshot = qimage.copy(left, top, width - left - right, height - top - bottom);
} else {
m_snapshot = qimage.copy();
m_snapshot = qimage;
}
const auto size = rect().marginsRemoved(QMargins(8, 8, 8, 8)).size();