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

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

Issue 15137009: Refactor shadow rendering logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: merge upstream changes Created 7 years, 7 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/InlineTextBox.cpp ('k') | Source/core/rendering/svg/SVGRenderingContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBoxModelObject.cpp
diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp
index e56afe976b0925d3b97ac658ea0c71c80e55f96d..139f0e152ec29fed1b3cff7e08a30590959eb381 100644
--- a/Source/core/rendering/RenderBoxModelObject.cpp
+++ b/Source/core/rendering/RenderBoxModelObject.cpp
@@ -31,6 +31,7 @@
#include "core/page/Page.h"
#include "core/page/Settings.h"
#include "core/page/scrolling/ScrollingConstraints.h"
+#include "core/platform/graphics/DrawLooper.h"
#include "core/platform/graphics/GraphicsContextStateSaver.h"
#include "core/platform/graphics/ImageBuffer.h"
#include "core/platform/graphics/Path.h"
@@ -520,7 +521,7 @@ static void applyBoxShadowForBackground(GraphicsContext* context, RenderStyle* s
boxShadow = boxShadow->next();
FloatSize shadowOffset(boxShadow->x(), boxShadow->y());
- context->setShadow(shadowOffset, boxShadow->blur(), boxShadow->color(), style->colorSpace());
+ context->setShadow(shadowOffset, boxShadow->blur(), boxShadow->color(), DrawLooper::ShadowIgnoresAlpha);
}
void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, const Color& color, const FillLayer* bgLayer, const LayoutRect& rect,
@@ -2392,7 +2393,7 @@ void RenderBoxModelObject::paintBoxShadow(const PaintInfo& info, const LayoutRec
IntSize extraOffset(paintRect.pixelSnappedWidth() + max(0, shadowOffset.width()) + shadowBlur + 2 * shadowSpread + 1, 0);
shadowOffset -= extraOffset;
fillRect.move(extraOffset);
- context->setShadow(shadowOffset, shadowBlur, shadowColor, s->colorSpace());
+ context->setShadow(shadowOffset, shadowBlur, shadowColor, DrawLooper::ShadowIgnoresAlpha);
if (hasBorderRadius) {
RoundedRect rectToClipOut = border;
@@ -2482,7 +2483,7 @@ void RenderBoxModelObject::paintBoxShadow(const PaintInfo& info, const LayoutRec
IntSize extraOffset(2 * paintRect.pixelSnappedWidth() + max(0, shadowOffset.width()) + shadowBlur - 2 * shadowSpread + 1, 0);
context->translate(extraOffset.width(), extraOffset.height());
shadowOffset -= extraOffset;
- context->setShadow(shadowOffset, shadowBlur, shadowColor, s->colorSpace());
+ context->setShadow(shadowOffset, shadowBlur, shadowColor, DrawLooper::ShadowIgnoresAlpha);
context->fillRectWithRoundedHole(outerRect, roundedHole, fillColor, s->colorSpace());
}
}
« no previous file with comments | « Source/core/rendering/InlineTextBox.cpp ('k') | Source/core/rendering/svg/SVGRenderingContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698