diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-12-09 10:05:37 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-12-09 10:05:37 (GMT) |
commit | 1ed1a8cd83a72588c4c972004abfff6fceef5c6e (patch) | |
tree | cef9444ddc60045b183dd8553137f48c68a841d1 /generic | |
parent | f702f015c3b36b9668a308355ca8634017501a59 (diff) | |
download | tk-1ed1a8cd83a72588c4c972004abfff6fceef5c6e.zip tk-1ed1a8cd83a72588c4c972004abfff6fceef5c6e.tar.gz tk-1ed1a8cd83a72588c4c972004abfff6fceef5c6e.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 05b0e57..9daf790 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.36.2.12 2004/12/03 13:16:35 dkf Exp $ + * RCS: @(#) $Id: tkImgPhoto.c,v 1.36.2.13 2004/12/09 10:05:38 dkf Exp $ */ #include "tkInt.h" @@ -4586,7 +4586,9 @@ Tk_PhotoPutBlock(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. @@ -4878,7 +4880,9 @@ Tk_PhotoPutZoomedBlock(handle, blockPtr, x, y, width, height, zoomX, zoomY, * Check if display code needs alpha blending... */ - ToggleComplexAlphaIfNeeded(masterPtr); + if (alphaOffset != 0 || masterPtr->flags & COMPLEX_ALPHA) { + ToggleComplexAlphaIfNeeded(masterPtr); + } /* * Update each instance. |