diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2004-12-09 10:13:27 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2004-12-09 10:13:27 (GMT) |
commit | 3bd027a55e3edf35f4489d821424f5b74f71f35f (patch) | |
tree | a248aa960247bf47b1be28853cd36c4caa4f1f27 /generic | |
parent | bff2cd3e38e7ed6efd098e98d4b8ca4039a4da31 (diff) | |
download | tk-3bd027a55e3edf35f4489d821424f5b74f71f35f.zip tk-3bd027a55e3edf35f4489d821424f5b74f71f35f.tar.gz tk-3bd027a55e3edf35f4489d821424f5b74f71f35f.tar.bz2 |
Speed up use of Tk_PhotoPutBlock by allowing it to skip the complex-alpha check
in degenerate (and common) cases. [Bug 1081966]
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkImgPhoto.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 34d0d46..fc3aa76 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -17,7 +17,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhoto.c,v 1.53 2004/12/03 13:09:39 dkf Exp $ + * RCS: @(#) $Id: tkImgPhoto.c,v 1.54 2004/12/09 10:13:28 dkf Exp $ */ #include "tkInt.h" @@ -4590,7 +4590,9 @@ Tk_PhotoPutBlock(interp, handle, blockPtr, x, y, width, height, compRule) * Check if display code needs alpha blending... */ - ToggleComplexAlphaIfNeeded(masterPtr); + if (alphaOffset != 0 || masterPtr->flags & COMPLEX_ALPHA) { + ToggleComplexAlphaIfNeeded(masterPtr); + } /* * Update each instance. @@ -4890,7 +4892,9 @@ Tk_PhotoPutZoomedBlock(interp, handle, blockPtr, x, y, width, height, * Check if display code needs alpha blending... */ - ToggleComplexAlphaIfNeeded(masterPtr); + if (alphaOffset != 0 || masterPtr->flags & COMPLEX_ALPHA) { + ToggleComplexAlphaIfNeeded(masterPtr); + } /* * Update each instance. |