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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 1419983006: demo tweaks, scale up perlin, add call to flush for fps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « samplecode/SampleAnimatedText.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « samplecode/SampleAnimatedText.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698