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

Unified Diff: Source/platform/graphics/GraphicsContext.cpp

Issue 177473003: Use SkLayerDrawLooper::Builder to construct SkLayerDrawLooper. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: DrawLooper::Builder Created 6 years, 10 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/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index 6ec5e4130dfe01f38c39a3fe0ce0de214fe7b34b..c141f1754a1317299e3f3760e6ec76b3ba0f522c 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -337,10 +337,10 @@ void GraphicsContext::setShadow(const FloatSize& offset, float blur, const Color
return;
}
- DrawLooper drawLooper;
- drawLooper.addShadow(offset, blur, color, shadowTransformMode, shadowAlphaMode);
- drawLooper.addUnmodifiedContent();
- setDrawLooper(drawLooper);
+ DrawLooper::Builder drawLooperBuilder;
+ drawLooperBuilder.addShadow(offset, blur, color, shadowTransformMode, shadowAlphaMode);
+ drawLooperBuilder.addUnmodifiedContent();
+ setDrawLooper(*drawLooperBuilder.detachDrawLooper().get());
}
void GraphicsContext::setDrawLooper(const DrawLooper& drawLooper)
@@ -772,10 +772,10 @@ void GraphicsContext::drawInnerShadow(const RoundedRect& rect, const Color& shad
clip(rect.rect());
}
- DrawLooper drawLooper;
- drawLooper.addShadow(shadowOffset, shadowBlur, shadowColor,
+ DrawLooper::Builder drawLooperBuilder;
+ drawLooperBuilder.addShadow(shadowOffset, shadowBlur, shadowColor,
DrawLooper::ShadowRespectsTransforms, DrawLooper::ShadowIgnoresAlpha);
- setDrawLooper(drawLooper);
+ setDrawLooper(*drawLooperBuilder.detachDrawLooper().get());
fillRectWithRoundedHole(outerRect, roundedHole, fillColor);
restore();
clearDrawLooper();
« Source/platform/graphics/DrawLooper.cpp ('K') | « Source/platform/graphics/DrawLooper.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698