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

Side by Side Diff: gm/imagealphathreshold.cpp

Issue 101763010: Fix build warnings in SkAlphaThresholdFilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix another warning Created 6 years, 11 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 | « no previous file | src/effects/SkAlphaThresholdFilter.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 7
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkAlphaThresholdFilter.h" 9 #include "SkAlphaThresholdFilter.h"
10 #include "SkRandom.h" 10 #include "SkRandom.h"
(...skipping 25 matching lines...) Expand all
36 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 36 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
37 SkIRect rects[2]; 37 SkIRect rects[2];
38 rects[0] = SkIRect::MakeXYWH(0, 150, WIDTH, HEIGHT - 300); 38 rects[0] = SkIRect::MakeXYWH(0, 150, WIDTH, HEIGHT - 300);
39 rects[1] = SkIRect::MakeXYWH(150, 0, WIDTH - 300, HEIGHT); 39 rects[1] = SkIRect::MakeXYWH(150, 0, WIDTH - 300, HEIGHT);
40 SkRegion region; 40 SkRegion region;
41 region.setRects(rects, 2); 41 region.setRects(rects, 2);
42 42
43 SkMatrix matrix; 43 SkMatrix matrix;
44 matrix.reset(); 44 matrix.reset();
45 matrix.setTranslate(WIDTH * .1f, HEIGHT * .1f); 45 matrix.setTranslate(WIDTH * .1f, HEIGHT * .1f);
46 matrix.postScale(.8, .8); 46 matrix.postScale(.8f, .8f);
47 47
48 canvas->concat(matrix); 48 canvas->concat(matrix);
49 49
50 SkPaint paint; 50 SkPaint paint;
51 paint.setImageFilter( 51 paint.setImageFilter(
52 SkAlphaThresholdFilter::Create(region, 0.2f, 0.7f))->unref(); 52 SkAlphaThresholdFilter::Create(region, 0.2f, 0.7f))->unref();
53 canvas->saveLayer(NULL, &paint); 53 canvas->saveLayer(NULL, &paint);
54 paint.setAntiAlias(true); 54 paint.setAntiAlias(true);
55 55
56 SkPaint rect_paint; 56 SkPaint rect_paint;
(...skipping 16 matching lines...) Expand all
73 private: 73 private:
74 typedef GM INHERITED; 74 typedef GM INHERITED;
75 }; 75 };
76 76
77 ////////////////////////////////////////////////////////////////////////////// 77 //////////////////////////////////////////////////////////////////////////////
78 78
79 static GM* MyFactory(void*) { return new ImageAlphaThresholdGM; } 79 static GM* MyFactory(void*) { return new ImageAlphaThresholdGM; }
80 static GMRegistry reg(MyFactory); 80 static GMRegistry reg(MyFactory);
81 81
82 } 82 }
OLDNEW
« no previous file with comments | « no previous file | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698