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

Unified Diff: src/animator/SkDrawExtraPathEffect.cpp

Issue 12521010: Turning on warning as error on Linux (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | « gyp/utils.gyp ('k') | src/pdf/SkPDFCatalog.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/animator/SkDrawExtraPathEffect.cpp
===================================================================
--- src/animator/SkDrawExtraPathEffect.cpp (revision 8038)
+++ src/animator/SkDrawExtraPathEffect.cpp (working copy)
@@ -128,6 +128,9 @@
apply->interpolate(*fMaker, SkScalarMulRound(distance, 1000));
matrix = (SkDrawMatrix*) apply->getScope();
}
+ if (matrix) {
+ m = matrix->getMatrix();
+ }
}
SkScalar result = 0;
SkAnimatorScript::EvaluateFloat(*fMaker, NULL, fDraw->spacing.c_str(), &result);
@@ -228,14 +231,21 @@
}
protected:
- virtual void begin(const SkIRect& uvBounds, SkPath* )
- {
+ virtual void begin(const SkIRect& uvBounds, SkPath*) const SK_OVERRIDE {
+ const_cast<SkShape2DPathEffect*>(this)->setUVBounds(uvBounds);
+ }
+
+ virtual void next(const SkPoint& loc, int u, int v, SkPath* dst) const SK_OVERRIDE {
+ const_cast<SkShape2DPathEffect*>(this)->addPath(loc, u, v, dst);
+ }
+
+private:
+ void setUVBounds(const SkIRect& uvBounds) {
fUVBounds.set(SkIntToScalar(uvBounds.fLeft), SkIntToScalar(uvBounds.fTop),
SkIntToScalar(uvBounds.fRight), SkIntToScalar(uvBounds.fBottom));
}
- virtual void next(const SkPoint& loc, int u, int v, SkPath* dst)
- {
+ void addPath(const SkPoint& loc, int u, int v, SkPath* dst) {
fLoc = loc;
fU = u;
fV = v;
@@ -272,8 +282,6 @@
fMaker->clearExtraPropertyCallBack(fDraw->fType);
}
-private:
-
static bool Get2D(const char* token, size_t len, void* s2D, SkScriptValue* value) {
static const char match[] = "locX|locY|left|top|right|bottom|u|v" ;
SkShape2DPathEffect* shape2D = (SkShape2DPathEffect*) s2D;
« no previous file with comments | « gyp/utils.gyp ('k') | src/pdf/SkPDFCatalog.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698