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

Side by Side Diff: samplecode/SampleFilterFuzz.cpp

Issue 1761793003: Revert of move annotations to canvas virtual (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « include/utils/SkNWayCanvas.h ('k') | src/core/SkAnnotation.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 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"
11 #include "SkArcToPathEffect.h" 11 #include "SkArcToPathEffect.h"
12 #include "SkAnnotation.h"
12 #include "SkBlurImageFilter.h" 13 #include "SkBlurImageFilter.h"
13 #include "SkBlurMaskFilter.h" 14 #include "SkBlurMaskFilter.h"
14 #include "SkCanvas.h" 15 #include "SkCanvas.h"
15 #include "SkColorCubeFilter.h" 16 #include "SkColorCubeFilter.h"
16 #include "SkColorFilter.h" 17 #include "SkColorFilter.h"
17 #include "SkColorFilterImageFilter.h" 18 #include "SkColorFilterImageFilter.h"
18 #include "SkColorMatrixFilter.h" 19 #include "SkColorMatrixFilter.h"
19 #include "SkComposeImageFilter.h" 20 #include "SkComposeImageFilter.h"
20 #include "SkCornerPathEffect.h" 21 #include "SkCornerPathEffect.h"
21 #include "SkDashPathEffect.h" 22 #include "SkDashPathEffect.h"
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 SkLayerRasterizer::Builder rasterizerBuilder; 538 SkLayerRasterizer::Builder rasterizerBuilder;
538 SkPaint paintForRasterizer; 539 SkPaint paintForRasterizer;
539 if (R(2) == 1) { 540 if (R(2) == 1) {
540 paintForRasterizer = make_paint(); 541 paintForRasterizer = make_paint();
541 } 542 }
542 rasterizerBuilder.addLayer(paintForRasterizer); 543 rasterizerBuilder.addLayer(paintForRasterizer);
543 SkAutoTUnref<SkRasterizer> rasterizer(rasterizerBuilder.detachRasterizer()); 544 SkAutoTUnref<SkRasterizer> rasterizer(rasterizerBuilder.detachRasterizer());
544 paint.setRasterizer(rasterizer); 545 paint.setRasterizer(rasterizer);
545 paint.setImageFilter(make_image_filter()); 546 paint.setImageFilter(make_image_filter());
546 SkAutoDataUnref data(make_3Dlut(nullptr, make_bool(), make_bool(), make_bool ())); 547 SkAutoDataUnref data(make_3Dlut(nullptr, make_bool(), make_bool(), make_bool ()));
548 SkAutoTUnref<SkAnnotation> annotation(
549 SkAnnotation::Create(make_string().c_str(), data));
550 paint.setAnnotation(annotation);
547 paint.setTextAlign(make_paint_align()); 551 paint.setTextAlign(make_paint_align());
548 paint.setTextSize(make_scalar()); 552 paint.setTextSize(make_scalar());
549 paint.setTextScaleX(make_scalar()); 553 paint.setTextScaleX(make_scalar());
550 paint.setTextSkewX(make_scalar()); 554 paint.setTextSkewX(make_scalar());
551 paint.setTextEncoding(make_paint_text_encoding()); 555 paint.setTextEncoding(make_paint_text_encoding());
552 return paint; 556 return paint;
553 } 557 }
554 558
555 static SkImageFilter* make_image_filter(bool canBeNull) { 559 static SkImageFilter* make_image_filter(bool canBeNull) {
556 SkImageFilter* filter = 0; 560 SkImageFilter* filter = 0;
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 } 821 }
818 822
819 private: 823 private:
820 typedef SkView INHERITED; 824 typedef SkView INHERITED;
821 }; 825 };
822 826
823 ////////////////////////////////////////////////////////////////////////////// 827 //////////////////////////////////////////////////////////////////////////////
824 828
825 static SkView* MyFactory() { return new ImageFilterFuzzView; } 829 static SkView* MyFactory() { return new ImageFilterFuzzView; }
826 static SkViewRegister reg(MyFactory); 830 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « include/utils/SkNWayCanvas.h ('k') | src/core/SkAnnotation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698