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

Unified Diff: Source/core/rendering/InlineTextBox.cpp

Issue 23102018: Refactoring DrawLooper so that it can apply shadow effects as skia image filters (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updated baselines and expectations 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/InlineTextBox.cpp
diff --git a/Source/core/rendering/InlineTextBox.cpp b/Source/core/rendering/InlineTextBox.cpp
index 2bfe7de7bd567c9e49c226ef29d52ea77c0c14fd..bf9ab04b82862c21e74a39359f6d6b1a936d9109 100644
--- a/Source/core/rendering/InlineTextBox.cpp
+++ b/Source/core/rendering/InlineTextBox.cpp
@@ -396,17 +396,17 @@ static void paintTextWithShadows(GraphicsContext* context,
Color fillColor = context->fillColor();
if (hasShadow) {
- DrawLooper drawLooper;
+ RefPtr<DrawLooper> drawLooper(new DrawLooper);
do {
int shadowX = horizontal ? shadow->x() : shadow->y();
int shadowY = horizontal ? shadow->y() : -shadow->x();
FloatSize offset(shadowX, shadowY);
- drawLooper.addShadow(offset, shadow->blur(),
+ drawLooper->addShadow(offset, shadow->blur(),
renderer->resolveColor(shadow->color(), Color::stdShadowColor),
DrawLooper::ShadowRespectsTransforms, DrawLooper::ShadowIgnoresAlpha);
} while ((shadow = shadow->next()));
- drawLooper.addUnmodifiedContent();
- context->setDrawLooper(drawLooper);
+ drawLooper->addUnmodifiedContent();
+ context->setDrawLooper(drawLooper.release());
}
TextRunPaintInfo textRunPaintInfo(textRun);

Powered by Google App Engine
This is Rietveld 408576698