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

Side by Side Diff: tests/PathOpsSkpClipTest.cpp

Issue 1018953003: Add SkEncodedFormat, used by SkCodec. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use a common enum for SkImageEncoder and SkImageDecoder and SkCodec Created 5 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
OLDNEW
1 #include "CrashHandler.h" 1 #include "CrashHandler.h"
2 // #include "OverwriteLine.h" 2 // #include "OverwriteLine.h"
3 #include "Resources.h" 3 #include "Resources.h"
4 #include "SkBitmap.h" 4 #include "SkBitmap.h"
5 #include "SkCanvas.h" 5 #include "SkCanvas.h"
6 #include "SkColor.h" 6 #include "SkColor.h"
7 #include "SkColorPriv.h" 7 #include "SkColorPriv.h"
8 #include "SkCommandLineFlags.h" 8 #include "SkCommandLineFlags.h"
9 #include "SkDevice.h" 9 #include "SkDevice.h"
10 #include "SkForceLinking.h" 10 #include "SkForceLinking.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } 419 }
420 pic->playback(canvas); 420 pic->playback(canvas);
421 if (scale != 1) { 421 if (scale != 1) {
422 canvas->restore(); 422 canvas->restore();
423 } 423 }
424 } 424 }
425 425
426 static void writePict(const SkBitmap& bitmap, const char* outDir, const char* pn gName) { 426 static void writePict(const SkBitmap& bitmap, const char* outDir, const char* pn gName) {
427 SkString outFile = get_sum_path(outDir); 427 SkString outFile = get_sum_path(outDir);
428 outFile.appendf("%s%s", PATH_SLASH, pngName); 428 outFile.appendf("%s%s", PATH_SLASH, pngName);
429 if (!SkImageEncoder::EncodeFile(outFile.c_str(), bitmap, SkImageEncoder::kPN G_Type, 100)) { 429 if (!SkImageEncoder::EncodeFile(outFile.c_str(), bitmap, kPNG_SkEncodedForma t, 100)) {
430 SkDebugf("unable to encode gr %s (width=%d height=%d)\n", pngName, 430 SkDebugf("unable to encode gr %s (width=%d height=%d)\n", pngName,
431 bitmap.width(), bitmap.height()); 431 bitmap.width(), bitmap.height());
432 } 432 }
433 } 433 }
434 434
435 void TestResult::testOne() { 435 void TestResult::testOne() {
436 SkPicture* pic = NULL; 436 SkPicture* pic = NULL;
437 { 437 {
438 #if DEBUG_SHOW_TEST_NAME 438 #if DEBUG_SHOW_TEST_NAME
439 if (fTestStep == kCompareBits) { 439 if (fTestStep == kCompareBits) {
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 } 1097 }
1098 SkGraphics::Term(); 1098 SkGraphics::Term();
1099 return 0; 1099 return 0;
1100 } 1100 }
1101 1101
1102 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 1102 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
1103 int main(int argc, char * const argv[]) { 1103 int main(int argc, char * const argv[]) {
1104 return tool_main(argc, (char**) argv); 1104 return tool_main(argc, (char**) argv);
1105 } 1105 }
1106 #endif 1106 #endif
OLDNEW
« include/core/SkImageEncoder.h ('K') | « tests/KtxTest.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698