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

Unified Diff: sky/engine/core/painting/Paint.cpp

Issue 1152963009: Add support for linear gradients, implemented as skia shaders. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: . Created 5 years, 6 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
« no previous file with comments | « sky/engine/core/painting/Paint.h ('k') | sky/engine/core/painting/Paint.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/painting/Paint.cpp
diff --git a/sky/engine/core/painting/Paint.cpp b/sky/engine/core/painting/Paint.cpp
index c11fa674d96c24e0b00b536af867af4103777dfa..8728d013cfb70647074e5504449988f9cc90fa06 100644
--- a/sky/engine/core/painting/Paint.cpp
+++ b/sky/engine/core/painting/Paint.cpp
@@ -8,6 +8,7 @@
#include "sky/engine/core/painting/ColorFilter.h"
#include "sky/engine/core/painting/DrawLooper.h"
#include "sky/engine/core/painting/MaskFilter.h"
+#include "sky/engine/core/painting/Shader.h"
namespace blink {
@@ -37,6 +38,12 @@ void Paint::setMaskFilter(MaskFilter* filter)
m_paint.setMaskFilter(filter->filter());
}
+void Paint::setShader(Shader* shader)
+{
+ ASSERT(shader);
+ m_paint.setShader(shader->shader());
+}
+
void Paint::setStyle(SkPaint::Style style)
{
m_paint.setStyle(style);
« no previous file with comments | « sky/engine/core/painting/Paint.h ('k') | sky/engine/core/painting/Paint.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698