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

Side by Side Diff: tests/SkpSkGrTest.cpp

Issue 1306823003: skia: add ability to load command_buffer_gles2 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: and NULL->nullptr, just because. Created 5 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 | « tests/GLProgramsTest.cpp ('k') | tools/PictureRenderer.h » ('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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
263 #else 264 #else
264 static const GLContextType kNative = GrContextFactory::kNative_GLContextType; 265 static const GLContextType kNative = GrContextFactory::kNative_GLContextType;
265 #endif 266 #endif
266 267
267 static int similarBits(const SkBitmap& gr, const SkBitmap& sk) { 268 static int similarBits(const SkBitmap& gr, const SkBitmap& sk) {
268 const int kRowCount = 3; 269 const int kRowCount = 3;
269 const int kThreshold = 3; 270 const int kThreshold = 3;
270 int width = SkTMin(gr.width(), sk.width()); 271 int width = SkTMin(gr.width(), sk.width());
271 if (width < kRowCount) { 272 if (width < kRowCount) {
272 return true; 273 return true;
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 int testIndex = 166; 752 int testIndex = 166;
752 int dirIndex = skipOverSkGr[testIndex - 166].directory; 753 int dirIndex = skipOverSkGr[testIndex - 166].directory;
753 SkString pictDir = make_in_dir_name(dirIndex); 754 SkString pictDir = make_in_dir_name(dirIndex);
754 if (pictDir.size() == 0) { 755 if (pictDir.size() == 0) {
755 return; 756 return;
756 } 757 }
757 SkString filename(skipOverSkGr[testIndex - 166].filename); 758 SkString filename(skipOverSkGr[testIndex - 166].filename);
758 TestResult::Test(dirIndex, filename.c_str(), kCompareBits, reporter->verbose ()); 759 TestResult::Test(dirIndex, filename.c_str(), kCompareBits, reporter->verbose ());
759 TestResult::Test(dirIndex, filename.c_str(), kEncodeFiles, reporter->verbose ()); 760 TestResult::Test(dirIndex, filename.c_str(), kEncodeFiles, reporter->verbose ());
760 } 761 }
OLDNEW
« no previous file with comments | « tests/GLProgramsTest.cpp ('k') | tools/PictureRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698