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

Side by Side Diff: samplecode/SamplePathFuzz.cpp

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « samplecode/SamplePathEffects.cpp ('k') | samplecode/SamplePictFile.cpp » ('j') | 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 2015 Google Inc. 2 * Copyright 2015 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 "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 protected: 664 protected:
665 // overrides from SkEventSink 665 // overrides from SkEventSink
666 virtual bool onQuery(SkEvent* evt) { 666 virtual bool onQuery(SkEvent* evt) {
667 if (SampleCode::TitleQ(*evt)) { 667 if (SampleCode::TitleQ(*evt)) {
668 SampleCode::TitleR(evt, "PathFuzzer"); 668 SampleCode::TitleR(evt, "PathFuzzer");
669 return true; 669 return true;
670 } 670 }
671 return this->INHERITED::onQuery(evt); 671 return this->INHERITED::onQuery(evt);
672 } 672 }
673 673
674 void onOnceBeforeDraw() SK_OVERRIDE { 674 void onOnceBeforeDraw() override {
675 fIndex = 0; 675 fIndex = 0;
676 SkImageInfo info(SkImageInfo::MakeN32Premul(SkScalarRoundToInt(width()), 676 SkImageInfo info(SkImageInfo::MakeN32Premul(SkScalarRoundToInt(width()),
677 SkScalarRoundToInt(height()))); 677 SkScalarRoundToInt(height())));
678 offscreen.allocPixels(info); 678 offscreen.allocPixels(info);
679 path_fuzz_stroker(&offscreen, fIndex); 679 path_fuzz_stroker(&offscreen, fIndex);
680 } 680 }
681 681
682 virtual void onDrawContent(SkCanvas* canvas) { 682 virtual void onDrawContent(SkCanvas* canvas) {
683 if (fOneDraw) { 683 if (fOneDraw) {
684 fuzzPath.randomize(); 684 fuzzPath.randomize();
(...skipping 18 matching lines...) Expand all
703 SkBitmap offscreen; 703 SkBitmap offscreen;
704 FuzzPath fuzzPath; 704 FuzzPath fuzzPath;
705 bool fOneDraw; 705 bool fOneDraw;
706 typedef SkView INHERITED; 706 typedef SkView INHERITED;
707 }; 707 };
708 708
709 static SkView* MyFactory() { return new PathFuzzView; } 709 static SkView* MyFactory() { return new PathFuzzView; }
710 static SkViewRegister reg(MyFactory); 710 static SkViewRegister reg(MyFactory);
711 711
712 712
OLDNEW
« no previous file with comments | « samplecode/SamplePathEffects.cpp ('k') | samplecode/SamplePictFile.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698