| OLD | NEW |
| 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 static SkString make_png_name(const char* filename) { | 253 static SkString make_png_name(const char* filename) { |
| 254 SkString pngName = SkString(filename); | 254 SkString pngName = SkString(filename); |
| 255 pngName.remove(pngName.size() - 3, 3); | 255 pngName.remove(pngName.size() - 3, 3); |
| 256 pngName.append("png"); | 256 pngName.append("png"); |
| 257 return pngName; | 257 return pngName; |
| 258 } | 258 } |
| 259 | 259 |
| 260 typedef GrContextFactory::GLContextType GLContextType; | 260 typedef GrContextFactory::GLContextType GLContextType; |
| 261 #ifdef SK_BUILD_FOR_WIN | 261 #ifdef SK_BUILD_FOR_WIN |
| 262 static const GLContextType kAngle = GrContextFactory::kANGLE_GLContextType; | 262 static const GLContextType kAngle = GrContextFactory::kANGLE_GLContextType; |
| 263 static const GLContextType kCommandBuffer = GrContextFactory::kCommandBuffer_GLC
ontextType; | |
| 264 #else | 263 #else |
| 265 static const GLContextType kNative = GrContextFactory::kNative_GLContextType; | 264 static const GLContextType kNative = GrContextFactory::kNative_GLContextType; |
| 266 #endif | 265 #endif |
| 267 | 266 |
| 268 static int similarBits(const SkBitmap& gr, const SkBitmap& sk) { | 267 static int similarBits(const SkBitmap& gr, const SkBitmap& sk) { |
| 269 const int kRowCount = 3; | 268 const int kRowCount = 3; |
| 270 const int kThreshold = 3; | 269 const int kThreshold = 3; |
| 271 int width = SkTMin(gr.width(), sk.width()); | 270 int width = SkTMin(gr.width(), sk.width()); |
| 272 if (width < kRowCount) { | 271 if (width < kRowCount) { |
| 273 return true; | 272 return true; |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 int testIndex = 166; | 751 int testIndex = 166; |
| 753 int dirIndex = skipOverSkGr[testIndex - 166].directory; | 752 int dirIndex = skipOverSkGr[testIndex - 166].directory; |
| 754 SkString pictDir = make_in_dir_name(dirIndex); | 753 SkString pictDir = make_in_dir_name(dirIndex); |
| 755 if (pictDir.size() == 0) { | 754 if (pictDir.size() == 0) { |
| 756 return; | 755 return; |
| 757 } | 756 } |
| 758 SkString filename(skipOverSkGr[testIndex - 166].filename); | 757 SkString filename(skipOverSkGr[testIndex - 166].filename); |
| 759 TestResult::Test(dirIndex, filename.c_str(), kCompareBits, reporter->verbose
()); | 758 TestResult::Test(dirIndex, filename.c_str(), kCompareBits, reporter->verbose
()); |
| 760 TestResult::Test(dirIndex, filename.c_str(), kEncodeFiles, reporter->verbose
()); | 759 TestResult::Test(dirIndex, filename.c_str(), kEncodeFiles, reporter->verbose
()); |
| 761 } | 760 } |
| OLD | NEW |