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

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

Issue 177473003: Use SkLayerDrawLooper::Builder to construct SkLayerDrawLooper. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add FINAL & DrawLooperBuilder::create(). 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/core/rendering/RenderBoxModelObject.cpp
diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp
index 6cb9d71692dbfc4bdb4ff4b268b9309637a62471..87dd6e395aa6222e2636f232c66f3b5ab71d4a9b 100644
--- a/Source/core/rendering/RenderBoxModelObject.cpp
+++ b/Source/core/rendering/RenderBoxModelObject.cpp
@@ -42,7 +42,7 @@
#include "core/rendering/compositing/RenderLayerCompositor.h"
#include "core/rendering/style/ShadowList.h"
#include "platform/geometry/TransformState.h"
-#include "platform/graphics/DrawLooper.h"
+#include "platform/graphics/DrawLooperBuilder.h"
#include "platform/graphics/GraphicsContextStateSaver.h"
#include "platform/graphics/Path.h"
#include "wtf/CurrentTime.h"
@@ -477,7 +477,7 @@ static void applyBoxShadowForBackground(GraphicsContext* context, const RenderOb
continue;
FloatSize shadowOffset(boxShadow.x(), boxShadow.y());
context->setShadow(shadowOffset, boxShadow.blur(), boxShadow.color(),
- DrawLooper::ShadowRespectsTransforms, DrawLooper::ShadowIgnoresAlpha);
+ DrawLooperBuilder::ShadowRespectsTransforms, DrawLooperBuilder::ShadowIgnoresAlpha);
return;
}
}
@@ -2512,10 +2512,10 @@ void RenderBoxModelObject::paintBoxShadow(const PaintInfo& info, const LayoutRec
}
// Draw only the shadow.
- DrawLooper drawLooper;
- drawLooper.addShadow(shadowOffset, shadowBlur, shadowColor,
- DrawLooper::ShadowRespectsTransforms, DrawLooper::ShadowIgnoresAlpha);
- context->setDrawLooper(drawLooper);
+ OwnPtr<DrawLooperBuilder> drawLooperBuilder = DrawLooperBuilder::create();
+ drawLooperBuilder->addShadow(shadowOffset, shadowBlur, shadowColor,
+ DrawLooperBuilder::ShadowRespectsTransforms, DrawLooperBuilder::ShadowIgnoresAlpha);
+ context->setDrawLooper(drawLooperBuilder.release());
if (hasBorderRadius) {
RoundedRect influenceRect(pixelSnappedIntRect(LayoutRect(shadowRect)), border.radii());

Powered by Google App Engine
This is Rietveld 408576698