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 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1413 | 1413 |
1414 this->updateTitle(); | 1414 this->updateTitle(); |
1415 this->inval(NULL); | 1415 this->inval(NULL); |
1416 } | 1416 } |
1417 bool SampleWindow::previousSample() { | 1417 bool SampleWindow::previousSample() { |
1418 fCurrIndex = (fCurrIndex - 1 + fSamples.count()) % fSamples.count(); | 1418 fCurrIndex = (fCurrIndex - 1 + fSamples.count()) % fSamples.count(); |
1419 this->loadView((*fSamples[fCurrIndex])()); | 1419 this->loadView((*fSamples[fCurrIndex])()); |
1420 return true; | 1420 return true; |
1421 } | 1421 } |
1422 | 1422 |
1423 #include "SkResourceCache.h" | |
1423 bool SampleWindow::nextSample() { | 1424 bool SampleWindow::nextSample() { |
1424 fCurrIndex = (fCurrIndex + 1) % fSamples.count(); | 1425 fCurrIndex = (fCurrIndex + 1) % fSamples.count(); |
1425 this->loadView((*fSamples[fCurrIndex])()); | 1426 this->loadView((*fSamples[fCurrIndex])()); |
1427 | |
1428 if (false) { | |
1429 SkResourceCache::TestDumpMemoryStatistics(); | |
mtklein_C
2015/08/04 20:27:37
I take it this stuff is temporary?
reed1
2015/08/07 16:19:59
Yea, just a place-holder until we find a UI way to
| |
1430 } | |
1431 | |
1426 return true; | 1432 return true; |
1427 } | 1433 } |
1428 | 1434 |
1429 bool SampleWindow::goToSample(int i) { | 1435 bool SampleWindow::goToSample(int i) { |
1430 fCurrIndex = (i) % fSamples.count(); | 1436 fCurrIndex = (i) % fSamples.count(); |
1431 this->loadView((*fSamples[fCurrIndex])()); | 1437 this->loadView((*fSamples[fCurrIndex])()); |
1432 return true; | 1438 return true; |
1433 } | 1439 } |
1434 | 1440 |
1435 SkString SampleWindow::getSampleTitle(int i) { | 1441 SkString SampleWindow::getSampleTitle(int i) { |
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2304 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2310 setenv("ANDROID_ROOT", "/android/device/data", 0); |
2305 #endif | 2311 #endif |
2306 SkGraphics::Init(); | 2312 SkGraphics::Init(); |
2307 SkEvent::Init(); | 2313 SkEvent::Init(); |
2308 } | 2314 } |
2309 | 2315 |
2310 void application_term() { | 2316 void application_term() { |
2311 SkEvent::Term(); | 2317 SkEvent::Term(); |
2312 SkGraphics::Term(); | 2318 SkGraphics::Term(); |
2313 } | 2319 } |
OLD | NEW |