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

Side by Side Diff: tests/SkpSkGrTest.cpp

Issue 296053016: remove bit rot test gyp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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 | « gyp/skpskgr_test.gyp ('k') | 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 #if !SK_SUPPORT_GPU 1 #if !SK_SUPPORT_GPU
2 #error "GPU support required" 2 #error "GPU support required"
3 #endif 3 #endif
4 4
5 #include "GrContext.h" 5 #include "GrContext.h"
6 #include "GrContextFactory.h" 6 #include "GrContextFactory.h"
7 #include "GrRenderTarget.h" 7 #include "GrRenderTarget.h"
8 #include "SkGpuDevice.h" 8 #include "SkGpuDevice.h"
9 #include "gl/GrGLDefines.h" 9 #include "gl/GrGLDefines.h"
10 10
(...skipping 30 matching lines...) Expand all
41 41
42 #define PATH_STR_SIZE 512 42 #define PATH_STR_SIZE 512
43 43
44 static const struct { 44 static const struct {
45 int directory; 45 int directory;
46 const char* filename; 46 const char* filename;
47 } skipOverSkGr[] = { 47 } skipOverSkGr[] = {
48 {1, "http___accuweather_com_.skp"}, // Couldn't convert bitmap to texture.h ttp___absoku072_com_ 48 {1, "http___accuweather_com_.skp"}, // Couldn't convert bitmap to texture.h ttp___absoku072_com_
49 }; 49 };
50 50
51 static const size_t skipOverSkGrCount = 0; // SK_ARRAY_COUNT(skipOverSkGr); 51 static const size_t skipOverSkGrCount = SK_ARRAY_COUNT(skipOverSkGr);
52 52
53 ///////////////////////////////////////// 53 /////////////////////////////////////////
54 54
55 class SkpSkGrThreadedRunnable; 55 class SkpSkGrThreadedRunnable;
56 56
57 enum TestStep { 57 enum TestStep {
58 kCompareBits, 58 kCompareBits,
59 kEncodeFiles, 59 kEncodeFiles,
60 }; 60 };
61 61
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 int maxWH = context->getMaxRenderTargetSize(); 418 int maxWH = context->getMaxRenderTargetSize();
419 int scale = 1; 419 int scale = 1;
420 while (pLargerWH / scale > maxWH) { 420 while (pLargerWH / scale > maxWH) {
421 scale *= 2; 421 scale *= 2;
422 } 422 }
423 SkBitmap bitmap; 423 SkBitmap bitmap;
424 SkIPoint dim; 424 SkIPoint dim;
425 do { 425 do {
426 dim.fX = (pWidth + scale - 1) / scale; 426 dim.fX = (pWidth + scale - 1) / scale;
427 dim.fY = (pHeight + scale - 1) / scale; 427 dim.fY = (pHeight + scale - 1) / scale;
428 bool success = bitmap.allocN32Pixels(, dim.fX, dim.fY); 428 bool success = bitmap.allocN32Pixels(dim.fX, dim.fY);
429 if (success) { 429 if (success) {
430 break; 430 break;
431 } 431 }
432 SkDebugf("-%d-", scale); 432 SkDebugf("-%d-", scale);
433 } while ((scale *= 2) < 256); 433 } while ((scale *= 2) < 256);
434 if (scale >= 256) { 434 if (scale >= 256) {
435 SkDebugf("unable to allocate bitmap for %s (w=%d h=%d) (sw=%d sh=%d) \n", 435 SkDebugf("unable to allocate bitmap for %s (w=%d h=%d) (sw=%d sh=%d) \n",
436 fFilename, pWidth, pHeight, dim.fX, dim.fY); 436 fFilename, pWidth, pHeight, dim.fX, dim.fY);
437 goto finish; 437 goto finish;
438 } 438 }
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 int testIndex = 166; 746 int testIndex = 166;
747 int dirIndex = skipOverSkGr[testIndex - 166].directory; 747 int dirIndex = skipOverSkGr[testIndex - 166].directory;
748 SkString pictDir = make_in_dir_name(dirIndex); 748 SkString pictDir = make_in_dir_name(dirIndex);
749 if (pictDir.size() == 0) { 749 if (pictDir.size() == 0) {
750 return; 750 return;
751 } 751 }
752 SkString filename(skipOverSkGr[testIndex - 166].filename); 752 SkString filename(skipOverSkGr[testIndex - 166].filename);
753 TestResult::Test(dirIndex, filename.c_str(), kCompareBits, reporter->verbose ()); 753 TestResult::Test(dirIndex, filename.c_str(), kCompareBits, reporter->verbose ());
754 TestResult::Test(dirIndex, filename.c_str(), kEncodeFiles, reporter->verbose ()); 754 TestResult::Test(dirIndex, filename.c_str(), kEncodeFiles, reporter->verbose ());
755 } 755 }
OLDNEW
« no previous file with comments | « gyp/skpskgr_test.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698