| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SampleApp.h" | 8 #include "SampleApp.h" |
| 9 | 9 |
| 10 #include "OverView.h" | 10 #include "OverView.h" |
| (...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 | 1408 |
| 1409 this->updateTitle(); | 1409 this->updateTitle(); |
| 1410 this->inval(NULL); | 1410 this->inval(NULL); |
| 1411 } | 1411 } |
| 1412 bool SampleWindow::previousSample() { | 1412 bool SampleWindow::previousSample() { |
| 1413 fCurrIndex = (fCurrIndex - 1 + fSamples.count()) % fSamples.count(); | 1413 fCurrIndex = (fCurrIndex - 1 + fSamples.count()) % fSamples.count(); |
| 1414 this->loadView((*fSamples[fCurrIndex])()); | 1414 this->loadView((*fSamples[fCurrIndex])()); |
| 1415 return true; | 1415 return true; |
| 1416 } | 1416 } |
| 1417 | 1417 |
| 1418 #include "SkResourceCache.h" |
| 1419 #include "SkGlyphCache.h" |
| 1418 bool SampleWindow::nextSample() { | 1420 bool SampleWindow::nextSample() { |
| 1419 fCurrIndex = (fCurrIndex + 1) % fSamples.count(); | 1421 fCurrIndex = (fCurrIndex + 1) % fSamples.count(); |
| 1420 this->loadView((*fSamples[fCurrIndex])()); | 1422 this->loadView((*fSamples[fCurrIndex])()); |
| 1423 |
| 1424 if (false) { |
| 1425 SkResourceCache::TestDumpMemoryStatistics(); |
| 1426 SkGlyphCache::Dump(); |
| 1427 SkDebugf("\n"); |
| 1428 } |
| 1429 |
| 1421 return true; | 1430 return true; |
| 1422 } | 1431 } |
| 1423 | 1432 |
| 1424 bool SampleWindow::goToSample(int i) { | 1433 bool SampleWindow::goToSample(int i) { |
| 1425 fCurrIndex = (i) % fSamples.count(); | 1434 fCurrIndex = (i) % fSamples.count(); |
| 1426 this->loadView((*fSamples[fCurrIndex])()); | 1435 this->loadView((*fSamples[fCurrIndex])()); |
| 1427 return true; | 1436 return true; |
| 1428 } | 1437 } |
| 1429 | 1438 |
| 1430 SkString SampleWindow::getSampleTitle(int i) { | 1439 SkString SampleWindow::getSampleTitle(int i) { |
| (...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2302 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2311 setenv("ANDROID_ROOT", "/android/device/data", 0); |
| 2303 #endif | 2312 #endif |
| 2304 SkGraphics::Init(); | 2313 SkGraphics::Init(); |
| 2305 SkEvent::Init(); | 2314 SkEvent::Init(); |
| 2306 } | 2315 } |
| 2307 | 2316 |
| 2308 void application_term() { | 2317 void application_term() { |
| 2309 SkEvent::Term(); | 2318 SkEvent::Term(); |
| 2310 SkGraphics::Term(); | 2319 SkGraphics::Term(); |
| 2311 } | 2320 } |
| OLD | NEW |