| Index: third_party/WebKit/Source/platform/graphics/Gradient.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/Gradient.cpp b/third_party/WebKit/Source/platform/graphics/Gradient.cpp
|
| index 72fc7c2c79e451c836245ff6c6231489602dd4c6..197e62987721c9ac8911a5474ef9ed5bd3a7b4c1 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/Gradient.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/Gradient.cpp
|
| @@ -30,6 +30,7 @@
|
| #include "platform/geometry/FloatRect.h"
|
| #include "platform/graphics/GraphicsContext.h"
|
| #include "platform/graphics/skia/SkiaUtils.h"
|
| +#include "skia/ext/cdl_shader.h"
|
| #include "third_party/skia/include/core/SkColor.h"
|
| #include "third_party/skia/include/core/SkMatrix.h"
|
| #include "third_party/skia/include/core/SkShader.h"
|
| @@ -176,7 +177,7 @@ static void fillStops(const Gradient::ColorStop* stopData,
|
| }
|
| }
|
|
|
| -sk_sp<SkShader> Gradient::createShader(const SkMatrix& localMatrix) {
|
| +sk_sp<CdlShader> Gradient::createShader(const SkMatrix& localMatrix) {
|
| sortStopsIfNecessary();
|
| ASSERT(m_stopsSorted);
|
|
|
| @@ -246,10 +247,10 @@ sk_sp<SkShader> Gradient::createShader(const SkMatrix& localMatrix) {
|
| shader = SkShader::MakeColorShader(colors[countUsed - 1]);
|
| }
|
|
|
| - return shader;
|
| + return WrapSkShader(shader);
|
| }
|
|
|
| -void Gradient::applyToPaint(SkPaint& paint, const SkMatrix& localMatrix) {
|
| +void Gradient::applyToPaint(CdlPaint& paint, const SkMatrix& localMatrix) {
|
| if (!m_cachedShader || localMatrix != m_cachedShader->getLocalMatrix())
|
| m_cachedShader = createShader(localMatrix);
|
|
|
|
|