aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleApp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'samplecode/SampleApp.cpp')
-rw-r--r--samplecode/SampleApp.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 99ceb3e9b2..88c7f4b70c 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -813,7 +813,14 @@ void SampleWindow::afterChildren(SkCanvas* orig) {
#endif
}
-// if ((fScrollTestX | fScrollTestY) != 0)
+ // Do this after presentGL and other finishing, rather than in afterChild
+ if (fMeasureFPS && fMeasureFPS_Time) {
+ fMeasureFPS_Time = SkTime::GetMSecs() - fMeasureFPS_Time;
+ this->updateTitle();
+ postInvalDelay(this->getSinkID());
+ }
+
+ // if ((fScrollTestX | fScrollTestY) != 0)
if (false) {
const SkBitmap& bm = orig->getDevice()->accessBitmap(true);
int dx = fScrollTestX * 7;
@@ -861,12 +868,6 @@ void SampleWindow::beforeChild(SkView* child, SkCanvas* canvas) {
void SampleWindow::afterChild(SkView* child, SkCanvas* canvas) {
canvas->setDrawFilter(NULL);
-
- if (fMeasureFPS && fMeasureFPS_Time) {
- fMeasureFPS_Time = SkTime::GetMSecs() - fMeasureFPS_Time;
- this->updateTitle();
- postInvalDelay(this->getSinkID());
- }
}
static SkBitmap::Config gConfigCycle[] = {