detect nearly translate-only matrices when drawing bitmaps (for speed)
rename setXfermode(Mode) to setXfermodeMode(Mode) for sanity
fix memory leak in setXfermode(Mode)
git-svn-id: http://skia.googlecode.com/svn/trunk@239 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleMipMap.cpp b/samplecode/SampleMipMap.cpp
index 025cb07..21bf0f0 100644
--- a/samplecode/SampleMipMap.cpp
+++ b/samplecode/SampleMipMap.cpp
@@ -65,7 +65,7 @@
bg.allocPixels();
SkAutoCanvasRestore acr(canvas, true);
- for (int i = 0; i < N-2; i++) {
+ for (int i = 0; i < 6; i++) {
bg.eraseColor(0);
SkCanvas c(bg);
c.scale(SK_Scalar1 / (1 << i), SK_Scalar1 / (1 << i));
@@ -87,6 +87,8 @@
this->drawBG(canvas);
canvas->translate(SkIntToScalar(10), SkIntToScalar(10));
+
+ canvas->scale(1.00000001, 0.9999999);
drawN2(canvas, fBitmap);