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

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: Adding missing adoptRefs 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
« no previous file with comments | « Source/core/rendering/EllipsisBox.cpp ('k') | Source/core/rendering/RenderBoxModelObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/InlineTextBox.cpp
diff --git a/Source/core/rendering/InlineTextBox.cpp b/Source/core/rendering/InlineTextBox.cpp
index 7287d000279ac5e1797ae2b4ca25f6255d2e1ff8..bfa9007d7d551cfe4da06bcdc2c61cce37a66d59 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 = adoptRef(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);
« no previous file with comments | « Source/core/rendering/EllipsisBox.cpp ('k') | Source/core/rendering/RenderBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698