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

Unified Diff: third_party/WebKit/Source/platform/graphics/Gradient.cpp

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem Created 3 years, 11 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: 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 62b46328ea0e3c82f76dcf89dbf4324038f25d2e..d81a7266808d0958935c8ea4dded44fafbdd71f7 100644
--- a/third_party/WebKit/Source/platform/graphics/Gradient.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Gradient.cpp
@@ -29,6 +29,7 @@
#include "platform/geometry/FloatRect.h"
#include "platform/graphics/GraphicsContext.h"
+#include "platform/graphics/paint/PaintShader.h"
#include "platform/graphics/skia/SkiaUtils.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkMatrix.h"
@@ -176,7 +177,7 @@ static void fillStops(const Gradient::ColorStop* stopData,
}
}
-sk_sp<SkShader> Gradient::createShader(const SkMatrix& localMatrix) {
+sk_sp<PaintShader> 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(PaintFlags& paint, const SkMatrix& localMatrix) {
if (!m_cachedShader || localMatrix != m_cachedShader->getLocalMatrix())
m_cachedShader = createShader(localMatrix);

Powered by Google App Engine
This is Rietveld 408576698