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

Side by Side Diff: samplecode/SampleFilterFuzz.cpp

Issue 1834303003: Delete SkFlattenable::Type (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 #include "SampleCode.h" 7 #include "SampleCode.h"
8 #include "Sk1DPathEffect.h" 8 #include "Sk1DPathEffect.h"
9 #include "Sk2DPathEffect.h" 9 #include "Sk2DPathEffect.h"
10 #include "SkAlphaThresholdFilter.h" 10 #include "SkAlphaThresholdFilter.h"
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 case 2: 735 case 2:
736 *p = 0x00; // Set all bits to 0 736 *p = 0x00; // Set all bits to 0
737 break; 737 break;
738 } 738 }
739 } else { 739 } else {
740 *p ^= (1 << R(8)); 740 *p ^= (1 << R(8));
741 } 741 }
742 } 742 }
743 } 743 }
744 #endif // SK_ADD_RANDOM_BIT_FLIPS 744 #endif // SK_ADD_RANDOM_BIT_FLIPS
745 SkFlattenable* flattenable = SkValidatingDeserializeFlattenable(ptr, len, 745 SkFlattenable* flattenable = SkValidatingDeserializeFlattenable(ptr, len);
746 SkImageFilter::GetFlattenableType());
747 return static_cast<SkImageFilter*>(flattenable); 746 return static_cast<SkImageFilter*>(flattenable);
748 } 747 }
749 748
750 static void drawClippedBitmap(SkCanvas* canvas, int x, int y, const SkPaint& pai nt) { 749 static void drawClippedBitmap(SkCanvas* canvas, int x, int y, const SkPaint& pai nt) {
751 canvas->save(); 750 canvas->save();
752 canvas->clipRect(SkRect::MakeXYWH(SkIntToScalar(x), SkIntToScalar(y), 751 canvas->clipRect(SkRect::MakeXYWH(SkIntToScalar(x), SkIntToScalar(y),
753 SkIntToScalar(kBitmapSize), SkIntToScalar(kBitmapSize))); 752 SkIntToScalar(kBitmapSize), SkIntToScalar(kBitmapSize)));
754 canvas->drawBitmap(make_bitmap(), SkIntToScalar(x), SkIntToScalar(y), &paint ); 753 canvas->drawBitmap(make_bitmap(), SkIntToScalar(x), SkIntToScalar(y), &paint );
755 canvas->restore(); 754 canvas->restore();
756 } 755 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 } 804 }
806 805
807 private: 806 private:
808 typedef SkView INHERITED; 807 typedef SkView INHERITED;
809 }; 808 };
810 809
811 ////////////////////////////////////////////////////////////////////////////// 810 //////////////////////////////////////////////////////////////////////////////
812 811
813 static SkView* MyFactory() { return new ImageFilterFuzzView; } 812 static SkView* MyFactory() { return new ImageFilterFuzzView; }
814 static SkViewRegister reg(MyFactory); 813 static SkViewRegister reg(MyFactory);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698