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

Unified Diff: third_party/WebKit/Source/core/style/ShadowList.cpp

Issue 1393593002: Convert SkLayerDrawLooper::addLayerOnTop calls to use addLayer instead Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 5 years, 2 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 | third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/ShadowList.cpp
diff --git a/third_party/WebKit/Source/core/style/ShadowList.cpp b/third_party/WebKit/Source/core/style/ShadowList.cpp
index 9f0c7e35523ea5c3424f9c11877ac4fef73cd4cc..ddefc4669fd36c6aa32f64eed5f52c7cc974210a 100644
--- a/third_party/WebKit/Source/core/style/ShadowList.cpp
+++ b/third_party/WebKit/Source/core/style/ShadowList.cpp
@@ -81,14 +81,13 @@ PassRefPtr<ShadowList> ShadowList::blend(const ShadowList* from, const ShadowLis
PassOwnPtr<DrawLooperBuilder> ShadowList::createDrawLooper(DrawLooperBuilder::ShadowAlphaMode alphaMode, const Color& currentColor, bool isHorizontal) const
{
OwnPtr<DrawLooperBuilder> drawLooperBuilder = DrawLooperBuilder::create();
- for (size_t i = shadows().size(); i--; ) {
- const ShadowData& shadow = shadows()[i];
+ drawLooperBuilder->addUnmodifiedContent();
+ for (const ShadowData& shadow : shadows()) {
float shadowX = isHorizontal ? shadow.x() : shadow.y();
float shadowY = isHorizontal ? shadow.y() : -shadow.x();
drawLooperBuilder->addShadow(FloatSize(shadowX, shadowY), shadow.blur(), shadow.color().resolve(currentColor),
DrawLooperBuilder::ShadowRespectsTransforms, alphaMode);
}
- drawLooperBuilder->addUnmodifiedContent();
return drawLooperBuilder.release();
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698