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

Side by Side Diff: gm/bigblurs.cpp

Issue 777643003: use ClipOp instead of SkRegion for clipping (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « gm/aaclip.cpp ('k') | gm/circularclips.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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "gm.h" 9 #include "gm.h"
10 #include "SkBlurMask.h" 10 #include "SkBlurMask.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 blurPaint.setMaskFilter(mf)->unref(); 74 blurPaint.setMaskFilter(mf)->unref();
75 75
76 for (int k = 0; k < (int)SK_ARRAY_COUNT(origins); ++k) { 76 for (int k = 0; k < (int)SK_ARRAY_COUNT(origins); ++k) {
77 canvas->save(); 77 canvas->save();
78 78
79 SkRect clipRect = SkRect::MakeXYWH(SkIntToScalar(desiredX), 79 SkRect clipRect = SkRect::MakeXYWH(SkIntToScalar(desiredX),
80 SkIntToScalar(desiredY), 80 SkIntToScalar(desiredY),
81 SkIntToScalar(kCloseUpSiz e), 81 SkIntToScalar(kCloseUpSiz e),
82 SkIntToScalar(kCloseUpSiz e)); 82 SkIntToScalar(kCloseUpSiz e));
83 83
84 canvas->clipRect(clipRect, SkRegion::kReplace_Op, false); 84 canvas->legacyClipRect(clipRect, SkRegion::kReplace_Op, fals e);
85 85
86 canvas->translate(desiredX-origins[k].fX, 86 canvas->translate(desiredX-origins[k].fX,
87 desiredY-origins[k].fY); 87 desiredY-origins[k].fY);
88 88
89 if (0 == i) { 89 if (0 == i) {
90 canvas->drawRect(bigRect, blurPaint); 90 canvas->drawRect(bigRect, blurPaint);
91 } else { 91 } else {
92 canvas->drawPath(rectori, blurPaint); 92 canvas->drawPath(rectori, blurPaint);
93 } 93 }
94 canvas->restore(); 94 canvas->restore();
(...skipping 12 matching lines...) Expand all
107 static const int kCloseUpSize = 64; 107 static const int kCloseUpSize = 64;
108 static const int kWidth = 5 * kCloseUpSize; 108 static const int kWidth = 5 * kCloseUpSize;
109 static const int kHeight = 2 * (kLastEnum_SkBlurStyle + 1) * kCloseUpSize; 109 static const int kHeight = 2 * (kLastEnum_SkBlurStyle + 1) * kCloseUpSize;
110 110
111 typedef GM INHERITED; 111 typedef GM INHERITED;
112 }; 112 };
113 113
114 DEF_GM( return SkNEW(BigBlursGM); ) 114 DEF_GM( return SkNEW(BigBlursGM); )
115 115
116 } 116 }
OLDNEW
« no previous file with comments | « gm/aaclip.cpp ('k') | gm/circularclips.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698