Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Side by Side Diff: Source/core/platform/graphics/GeneratorGeneratedImage.cpp

Issue 22596003: Fix background blending for some cases where it did not work at all. The fix adds the blendMode par… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: adding TestExpectation lines for rebaselining Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698