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

Unified Diff: samplecode/SampleApp.cpp

Issue 953383002: fuzzer fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix up width and height in initializer Created 5 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPath.h ('k') | samplecode/SampleCode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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++) {
« no previous file with comments | « include/core/SkPath.h ('k') | samplecode/SampleCode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698