Index: samplecode/SampleApp.cpp |
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp |
index 17e8623d4f4df754cea1b3441b0184d10c823966..2b3183023a9064f54667e58def6bb5217b5e533a 100644 |
--- a/samplecode/SampleApp.cpp |
+++ b/samplecode/SampleApp.cpp |
@@ -2135,6 +2135,10 @@ void SampleView::draw(SkCanvas* canvas) { |
} |
void SampleView::onDraw(SkCanvas* canvas) { |
+ if (!fHaveCalledOnceBeforeDraw) { |
+ fHaveCalledOnceBeforeDraw = true; |
+ this->onOnceBeforeDraw(); |
+ } |
this->onDrawBackground(canvas); |
for (int i = 0; i < fRepeatCount; i++) { |