[aseprite] 89/250: Add minor check (bg index != local mask) to avoid checking the whole image

Tobias Hansen thansen at moszumanska.debian.org
Sun Dec 20 15:27:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit dd87c2ef172f938d96ba66a353c6a88f3fbdedaf
Author: David Capello <davidcapello at gmail.com>
Date:   Thu Sep 24 23:50:44 2015 -0300

    Add minor check (bg index != local mask) to avoid checking the whole image
---
 src/app/file/gif_format.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/app/file/gif_format.cpp b/src/app/file/gif_format.cpp
index 19472cc..647f9a4 100644
--- a/src/app/file/gif_format.cpp
+++ b/src/app/file/gif_format.cpp
@@ -474,7 +474,8 @@ private:
     // Check if we need an extra color equal to the bg color in a
     // transparent frameImage.
     bool needsExtraBgColor = false;
-    if (!m_opaque && m_sprite->pixelFormat() == IMAGE_INDEXED) {
+    if (m_sprite->pixelFormat() == IMAGE_INDEXED &&
+        !m_opaque && m_bgIndex != m_localTransparentIndex) {
       for (const auto& i : LockImageBits<IndexedTraits>(frameImage)) {
         if (i == m_bgIndex &&
             i != m_localTransparentIndex) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list