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

Unified Diff: samplecode/SampleAtlas.cpp

Issue 1216433002: implement drawAtlas natively on gpu-device (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use SkRect::toQuad 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 | « no previous file | src/core/SkMatrix.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleAtlas.cpp
diff --git a/samplecode/SampleAtlas.cpp b/samplecode/SampleAtlas.cpp
index adf3f5e3a4655dc91a140f5fa88bc9410c70ab0c..ed208c3a77a865eb80f8c66d2829711ccf95eedf 100644
--- a/samplecode/SampleAtlas.cpp
+++ b/samplecode/SampleAtlas.cpp
@@ -68,11 +68,13 @@ class DrawAtlasDrawable : public SkDrawable {
fVelocity.fX = -fVelocity.fX;
}
if (fCenter.fY > bounds.bottom()) {
- SkASSERT(fVelocity.fY > 0);
- fVelocity.fY = -fVelocity.fY;
+ if (fVelocity.fY > 0) {
+ fVelocity.fY = -fVelocity.fY;
+ }
} else if (fCenter.fY < bounds.top()) {
- SkASSERT(fVelocity.fY < 0);
- fVelocity.fY = -fVelocity.fY;
+ if (fVelocity.fY < 0) {
+ fVelocity.fY = -fVelocity.fY;
+ }
}
fScale += fDScale;
« no previous file with comments | « no previous file | src/core/SkMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698