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

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

Issue 177473003: Use SkLayerDrawLooper::Builder to construct SkLayerDrawLooper. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/DrawLooper.cpp
diff --git a/Source/platform/graphics/DrawLooper.cpp b/Source/platform/graphics/DrawLooper.cpp
index 7e32af73feaa58f46031efb5b0aea099ef61749c..1c376ea6043ffd8042925ff0ed52257c01f09e24 100644
--- a/Source/platform/graphics/DrawLooper.cpp
+++ b/Source/platform/graphics/DrawLooper.cpp
@@ -39,23 +39,22 @@
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkXfermode.h"
#include "third_party/skia/include/effects/SkBlurMaskFilter.h"
-#include "third_party/skia/include/effects/SkLayerDrawLooper.h"
namespace WebCore {
-DrawLooper::DrawLooper() : m_skDrawLooper(adoptRef(new SkLayerDrawLooper)) { }
+DrawLooper::DrawLooper() { }
DrawLooper::~DrawLooper() { }
-SkDrawLooper* DrawLooper::skDrawLooper() const
+SkDrawLooper* DrawLooper::skDrawLooper()
{
- return m_skDrawLooper.get();
+ return m_skDrawLooperBuilder.detachLooper();
}
void DrawLooper::addUnmodifiedContent()
{
SkLayerDrawLooper::LayerInfo info;
- m_skDrawLooper->addLayerOnTop(info);
+ m_skDrawLooperBuilder.addLayerOnTop(info);
}
void DrawLooper::addShadow(const FloatSize& offset, float blur, const Color& color,
@@ -86,7 +85,7 @@ void DrawLooper::addShadow(const FloatSize& offset, float blur, const Color& col
info.fOffset.set(offset.width(), offset.height());
info.fPostTranslate = (shadowTransformMode == ShadowIgnoresTransforms);
- SkPaint* paint = m_skDrawLooper->addLayerOnTop(info);
+ SkPaint* paint = m_skDrawLooperBuilder.addLayerOnTop(info);
if (blur) {
uint32_t mfFlags = SkBlurMaskFilter::kHighQuality_BlurFlag;

Powered by Google App Engine
This is Rietveld 408576698