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

Side by Side Diff: tests/Float16Test.cpp

Issue 1787883002: Add SkSpecialImage::extractSubset & NewFromPixmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT 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 | « tests/DeviceLooperTest.cpp ('k') | tests/ImageTest.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 2016 Google Inc. 2 * Copyright 2016 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 "Test.h" 8 #include "Test.h"
9 #include "SkAutoPixmapStorage.h"
9 #include "SkColor.h" 10 #include "SkColor.h"
10 #include "SkHalf.h" 11 #include "SkHalf.h"
11 #include "SkOpts.h" 12 #include "SkOpts.h"
12 #include "SkPixmap.h" 13 #include "SkPixmap.h"
13 #include "SkPM4f.h" 14 #include "SkPM4f.h"
14 #include "SkRandom.h" 15 #include "SkRandom.h"
15 16
16 static bool eq_within_half_float(float a, float b) { 17 static bool eq_within_half_float(float a, float b) {
17 const float kTolerance = 1.0f / (1 << (8 + 10)); 18 const float kTolerance = 1.0f / (1 << (8 + 10));
18 19
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 bool ok = (h1 == h2 || h1 == h2-1); 107 bool ok = (h1 == h2 || h1 == h2-1);
107 REPORTER_ASSERT(r, ok); 108 REPORTER_ASSERT(r, ok);
108 if (!ok) { 109 if (!ok) {
109 SkDebugf("%08x (%d) -> %04x (%d), want %04x (%d)\n", 110 SkDebugf("%08x (%d) -> %04x (%d), want %04x (%d)\n",
110 bits, bits>>23, h1, h1>>10, h2, h2>>10); 111 bits, bits>>23, h1, h1>>10, h2, h2>>10);
111 break; 112 break;
112 } 113 }
113 } 114 }
114 } 115 }
115 } 116 }
OLDNEW
« no previous file with comments | « tests/DeviceLooperTest.cpp ('k') | tests/ImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698