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

Unified Diff: Source/platform/graphics/GeneratedImage.cpp

Issue 1213723006: Drop pattern-related state from GraphicsContext(State) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/platform/graphics/GraphicsContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GeneratedImage.cpp
diff --git a/Source/platform/graphics/GeneratedImage.cpp b/Source/platform/graphics/GeneratedImage.cpp
index 27b889be0348027bd0a13250f007cafbc98c4868..76622c43d5f3a1b656e4feeed445ab9c9cdc1154 100644
--- a/Source/platform/graphics/GeneratedImage.cpp
+++ b/Source/platform/graphics/GeneratedImage.cpp
@@ -65,9 +65,12 @@ void GeneratedImage::drawPattern(GraphicsContext* destContext, const FloatRect&
RefPtr<Pattern> picturePattern = Pattern::createPicturePattern(tilePicture);
picturePattern->setPatternSpaceTransform(patternTransform);
- GraphicsContextStateSaver saver(*destContext);
- destContext->setFillPattern(picturePattern);
- destContext->fillRect(destRect, destContext->fillColor(), compositeOp);
+ SkPaint fillPaint = destContext->fillPaint();
+ fillPaint.setShader(picturePattern->shader());
+ fillPaint.setColor(SK_ColorBLACK);
+ fillPaint.setXfermodeMode(compositeOp);
+
+ destContext->drawRect(destRect, fillPaint);
}
} // namespace blink
« no previous file with comments | « no previous file | Source/platform/graphics/GraphicsContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698