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

Unified Diff: experimental/SkiaExamples/HelloSkiaExample.cpp

Issue 287063009: Revert of remove unused (by clients) SkUnitMapper (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 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 | « expectations/gm/ignored-tests.txt ('k') | experimental/webtry/templates/template.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/SkiaExamples/HelloSkiaExample.cpp
diff --git a/experimental/SkiaExamples/HelloSkiaExample.cpp b/experimental/SkiaExamples/HelloSkiaExample.cpp
index 6fd2624c18b0e5e97f9f3ff69b5abfe716f6cbce..0b6c790460eb54900b859e839f73275a0ead41ee 100644
--- a/experimental/SkiaExamples/HelloSkiaExample.cpp
+++ b/experimental/SkiaExamples/HelloSkiaExample.cpp
@@ -13,6 +13,7 @@
#include "SkDraw.h"
#include "SkGradientShader.h"
#include "SkGraphics.h"
+#include "SkUnitMappers.h"
class HelloSkia : public SkExample {
public:
@@ -49,9 +50,12 @@
};
SkColor linearColors[] = {SK_ColorGREEN, SK_ColorBLACK};
+ SkUnitMapper* linearMapper = new SkDiscreteMapper(100);
+ SkAutoUnref lm_deleter(linearMapper);
+
SkShader* shader = SkGradientShader::CreateLinear(
linearPoints, linearColors, NULL, 2,
- SkShader::kMirror_TileMode);
+ SkShader::kMirror_TileMode, linearMapper);
SkAutoUnref shader_deleter(shader);
paint.setShader(shader);
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | experimental/webtry/templates/template.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698