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 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1434 if (pict.get() != nullptr) { | 1434 if (pict.get() != nullptr) { |
1435 orig->drawPicture(pict.get()); | 1435 orig->drawPicture(pict.get()); |
1436 } | 1436 } |
1437 } else { | 1437 } else { |
1438 picture->playback(orig); | 1438 picture->playback(orig); |
1439 } | 1439 } |
1440 } | 1440 } |
1441 | 1441 |
1442 // Do this after presentGL and other finishing, rather than in afterChild | 1442 // Do this after presentGL and other finishing, rather than in afterChild |
1443 if (fMeasureFPS) { | 1443 if (fMeasureFPS) { |
| 1444 orig->flush(); |
1444 fTimer.end(); | 1445 fTimer.end(); |
1445 fMeasureFPS_Time += fTimer.fWall; | 1446 fMeasureFPS_Time += fTimer.fWall; |
1446 } | 1447 } |
1447 } | 1448 } |
1448 | 1449 |
1449 void SampleWindow::beforeChild(SkView* child, SkCanvas* canvas) { | 1450 void SampleWindow::beforeChild(SkView* child, SkCanvas* canvas) { |
1450 if (fRotate) { | 1451 if (fRotate) { |
1451 SkScalar cx = this->width() / 2; | 1452 SkScalar cx = this->width() / 2; |
1452 SkScalar cy = this->height() / 2; | 1453 SkScalar cy = this->height() / 2; |
1453 canvas->translate(cx, cy); | 1454 canvas->translate(cx, cy); |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2451 #ifdef SK_BUILD_FOR_MAC | 2452 #ifdef SK_BUILD_FOR_MAC |
2452 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2453 setenv("ANDROID_ROOT", "/android/device/data", 0); |
2453 #endif | 2454 #endif |
2454 SkGraphics::Init(); | 2455 SkGraphics::Init(); |
2455 SkEvent::Init(); | 2456 SkEvent::Init(); |
2456 } | 2457 } |
2457 | 2458 |
2458 void application_term() { | 2459 void application_term() { |
2459 SkEvent::Term(); | 2460 SkEvent::Term(); |
2460 } | 2461 } |
OLD | NEW |