OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009, 2010, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010, 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 // Fill with the generated image. | 133 // Fill with the generated image. |
134 m_cachedImageBuffer->context()->setFillGradient(m_gradient); | 134 m_cachedImageBuffer->context()->setFillGradient(m_gradient); |
135 m_cachedImageBuffer->context()->fillRect(FloatRect(FloatPoint(), adjuste
dSize)); | 135 m_cachedImageBuffer->context()->fillRect(FloatRect(FloatPoint(), adjuste
dSize)); |
136 | 136 |
137 m_cachedGeneratorHash = generatorHash; | 137 m_cachedGeneratorHash = generatorHash; |
138 m_cachedAdjustedSize = adjustedSize; | 138 m_cachedAdjustedSize = adjustedSize; |
139 } | 139 } |
140 | 140 |
141 // Tile the image buffer into the context. | 141 // Tile the image buffer into the context. |
142 m_cachedImageBuffer->drawPattern(destContext, adjustedSrcRect, scaleWithoutC
TM, phase, compositeOp, destRect); | 142 m_cachedImageBuffer->drawPattern(destContext, adjustedSrcRect, scaleWithoutC
TM, phase, compositeOp, destRect, blendMode); |
143 m_cacheTimer.restart(); | 143 m_cacheTimer.restart(); |
144 } | 144 } |
145 | 145 |
146 void GeneratorGeneratedImage::invalidateCacheTimerFired(DeferrableOneShotTimer<G
eneratorGeneratedImage>*) | 146 void GeneratorGeneratedImage::invalidateCacheTimerFired(DeferrableOneShotTimer<G
eneratorGeneratedImage>*) |
147 { | 147 { |
148 m_cachedImageBuffer.clear(); | 148 m_cachedImageBuffer.clear(); |
149 m_cachedAdjustedSize = IntSize(); | 149 m_cachedAdjustedSize = IntSize(); |
150 } | 150 } |
151 | 151 |
152 } | 152 } |
OLD | NEW |