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

Side by Side Diff: gm/convexpolyclip.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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 | « gm/bleed.cpp ('k') | gm/convexpolyeffect.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 2014 Google Inc. 3 * Copyright 2014 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 10
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 txtPaint.setTextSize(23.f); 151 txtPaint.setTextSize(23.f);
152 txtPaint.setAntiAlias(true); 152 txtPaint.setAntiAlias(true);
153 sk_tool_utils::set_portable_typeface(&txtPaint); 153 sk_tool_utils::set_portable_typeface(&txtPaint);
154 txtPaint.setColor(SK_ColorDKGRAY); 154 txtPaint.setColor(SK_ColorDKGRAY);
155 SkScalar textW = txtPaint.measureText(kTxt, SK_ARRAY_COUNT(kTxt)-1); 155 SkScalar textW = txtPaint.measureText(kTxt, SK_ARRAY_COUNT(kTxt)-1);
156 156
157 SkScalar startX = 0; 157 SkScalar startX = 0;
158 int testLayers = kBench_Mode != this->getMode(); 158 int testLayers = kBench_Mode != this->getMode();
159 for (int doLayer = 0; doLayer <= testLayers; ++doLayer) { 159 for (int doLayer = 0; doLayer <= testLayers; ++doLayer) {
160 for (SkTLList<Clip>::Iter iter(fClips, SkTLList<Clip>::Iter::kHead_I terStart); 160 for (SkTLList<Clip>::Iter iter(fClips, SkTLList<Clip>::Iter::kHead_I terStart);
161 NULL != iter.get(); 161 iter.get();
162 iter.next()) { 162 iter.next()) {
163 const Clip* clip = iter.get(); 163 const Clip* clip = iter.get();
164 SkScalar x = startX; 164 SkScalar x = startX;
165 for (int aa = 0; aa < 2; ++aa) { 165 for (int aa = 0; aa < 2; ++aa) {
166 if (doLayer) { 166 if (doLayer) {
167 SkRect bounds; 167 SkRect bounds;
168 clip->getBounds(&bounds); 168 clip->getBounds(&bounds);
169 bounds.outset(2, 2); 169 bounds.outset(2, 2);
170 bounds.offset(x, y); 170 bounds.offset(x, y);
171 canvas->saveLayer(&bounds, NULL); 171 canvas->saveLayer(&bounds, NULL);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 294
295 SkTLList<Clip> fClips; 295 SkTLList<Clip> fClips;
296 SkBitmap fBmp; 296 SkBitmap fBmp;
297 297
298 typedef GM INHERITED; 298 typedef GM INHERITED;
299 }; 299 };
300 300
301 DEF_GM( return SkNEW(ConvexPolyClip); ) 301 DEF_GM( return SkNEW(ConvexPolyClip); )
302 302
303 } 303 }
OLDNEW
« no previous file with comments | « gm/bleed.cpp ('k') | gm/convexpolyeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698