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

Unified Diff: Source/core/rendering/svg/SVGInlineTextBox.cpp

Issue 356123002: Consolidate some text shadow code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rendererToUse -> renderer() Created 6 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 | « Source/core/rendering/style/ShadowList.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGInlineTextBox.cpp
diff --git a/Source/core/rendering/svg/SVGInlineTextBox.cpp b/Source/core/rendering/svg/SVGInlineTextBox.cpp
index 939feb577d140caf08573d08728ee269e22d5d22..434d6e10af82da33a4192672e834fb2f9eee5113 100644
--- a/Source/core/rendering/svg/SVGInlineTextBox.cpp
+++ b/Source/core/rendering/svg/SVGInlineTextBox.cpp
@@ -41,7 +41,6 @@
#include "core/rendering/svg/SVGTextRunRenderingContext.h"
#include "platform/FloatConversion.h"
#include "platform/fonts/FontCache.h"
-#include "platform/graphics/DrawLooperBuilder.h"
#include "platform/graphics/GraphicsContextStateSaver.h"
namespace WebCore {
@@ -633,17 +632,8 @@ void SVGInlineTextBox::paintTextWithShadows(GraphicsContext* context, RenderStyl
context->scale(1 / scalingFactor, 1 / scalingFactor);
}
- if (hasShadow) {
- OwnPtr<DrawLooperBuilder> drawLooperBuilder = DrawLooperBuilder::create();
- for (size_t i = shadowList->shadows().size(); i--; ) {
- const ShadowData& shadow = shadowList->shadows()[i];
- FloatSize offset(shadow.x(), shadow.y());
- drawLooperBuilder->addShadow(offset, shadow.blur(), shadow.color(),
- DrawLooperBuilder::ShadowRespectsTransforms, DrawLooperBuilder::ShadowRespectsAlpha);
- }
- drawLooperBuilder->addUnmodifiedContent();
- context->setDrawLooper(drawLooperBuilder.release());
- }
+ if (hasShadow)
+ context->setDrawLooper(shadowList->createDrawLooper(DrawLooperBuilder::ShadowRespectsAlpha));
if (prepareGraphicsContextForTextPainting(context, scalingFactor, textRun, style, resourceMode)) {
TextRunPaintInfo textRunPaintInfo(textRun);
« no previous file with comments | « Source/core/rendering/style/ShadowList.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698