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

Side by Side Diff: tests/SkpSkGrTest.cpp

Issue 1845923004: Rename enums in GrContextFactory to remove "GL" (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 years, 8 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/ImageTest.cpp ('k') | tests/TestConfigParsing.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 "GrContext.h" 8 #include "GrContext.h"
9 #include "GrContextFactory.h" 9 #include "GrContextFactory.h"
10 #include "GrRenderTarget.h" 10 #include "GrRenderTarget.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 return true; 246 return true;
247 } 247 }
248 248
249 static SkString make_png_name(const char* filename) { 249 static SkString make_png_name(const char* filename) {
250 SkString pngName = SkString(filename); 250 SkString pngName = SkString(filename);
251 pngName.remove(pngName.size() - 3, 3); 251 pngName.remove(pngName.size() - 3, 3);
252 pngName.append("png"); 252 pngName.append("png");
253 return pngName; 253 return pngName;
254 } 254 }
255 255
256 typedef GrContextFactory::GLContextType GLContextType; 256 typedef GrContextFactory::ContextType ContextType;
257 #ifdef SK_BUILD_FOR_WIN 257 #ifdef SK_BUILD_FOR_WIN
258 static const GLContextType kAngle = GrContextFactory::kANGLE_GLContextType; 258 static const ContextType kAngle = GrContextFactory::kANGLE_ContextType;
259 #else 259 #else
260 static const GLContextType kNative = GrContextFactory::kNative_GLContextType; 260 static const ContextType kNative = GrContextFactory::kNativeGL_ContextType;
261 #endif 261 #endif
262 262
263 static int similarBits(const SkBitmap& gr, const SkBitmap& sk) { 263 static int similarBits(const SkBitmap& gr, const SkBitmap& sk) {
264 const int kRowCount = 3; 264 const int kRowCount = 3;
265 const int kThreshold = 3; 265 const int kThreshold = 3;
266 int width = SkTMin(gr.width(), sk.width()); 266 int width = SkTMin(gr.width(), sk.width());
267 if (width < kRowCount) { 267 if (width < kRowCount) {
268 return true; 268 return true;
269 } 269 }
270 int height = SkTMin(gr.height(), sk.height()); 270 int height = SkTMin(gr.height(), sk.height());
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 int testIndex = 166; 745 int testIndex = 166;
746 int dirIndex = skipOverSkGr[testIndex - 166].directory; 746 int dirIndex = skipOverSkGr[testIndex - 166].directory;
747 SkString pictDir = make_in_dir_name(dirIndex); 747 SkString pictDir = make_in_dir_name(dirIndex);
748 if (pictDir.size() == 0) { 748 if (pictDir.size() == 0) {
749 return; 749 return;
750 } 750 }
751 SkString filename(skipOverSkGr[testIndex - 166].filename); 751 SkString filename(skipOverSkGr[testIndex - 166].filename);
752 TestResult::Test(dirIndex, filename.c_str(), kCompareBits, reporter->verbose ()); 752 TestResult::Test(dirIndex, filename.c_str(), kCompareBits, reporter->verbose ());
753 TestResult::Test(dirIndex, filename.c_str(), kEncodeFiles, reporter->verbose ()); 753 TestResult::Test(dirIndex, filename.c_str(), kEncodeFiles, reporter->verbose ());
754 } 754 }
OLDNEW
« no previous file with comments | « tests/ImageTest.cpp ('k') | tests/TestConfigParsing.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698