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

Side by Side Diff: tests/RectTest.cpp

Issue 2134023003: Revert of Fix compile error on MSAN bot (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | no next file » | 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 2015 Google Inc. 2 * Copyright 2015 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkRandom.h"
11 #include "SkRect.h" 10 #include "SkRect.h"
12 #include "Test.h" 11 #include "Test.h"
13 12
14 static bool has_green_pixels(const SkBitmap& bm) { 13 static bool has_green_pixels(const SkBitmap& bm) {
15 for (int j = 0; j < bm.height(); ++j) { 14 for (int j = 0; j < bm.height(); ++j) {
16 for (int i = 0; i < bm.width(); ++i) { 15 for (int i = 0; i < bm.width(); ++i) {
17 if (SkColorGetG(bm.getColor(i, j))) { 16 if (SkColorGetG(bm.getColor(i, j))) {
18 return true; 17 return true;
19 } 18 }
20 } 19 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 SkScalarRoundToInt(src.fRight), 113 SkScalarRoundToInt(src.fRight),
115 SkScalarRoundToInt(src.fBottom) 114 SkScalarRoundToInt(src.fBottom)
116 }; 115 };
117 SkIRect ir1 = src.round(); 116 SkIRect ir1 = src.round();
118 SkIRect ir2 = src.round2i(); 117 SkIRect ir2 = src.round2i();
119 118
120 REPORTER_ASSERT(reporter, ir0 == ir1); 119 REPORTER_ASSERT(reporter, ir0 == ir1);
121 REPORTER_ASSERT(reporter, ir0 == ir2); 120 REPORTER_ASSERT(reporter, ir0 == ir2);
122 } 121 }
123 } 122 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698