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

Side by Side Diff: tests/ImageDecodingTest.cpp

Issue 302053002: Revert of setConfig -> setInfo (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « tests/CanvasTest.cpp ('k') | tests/PictureTest.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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkColor.h" 10 #include "SkColor.h"
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 * SkInstallDiscardablePixelRef functions. 502 * SkInstallDiscardablePixelRef functions.
503 */ 503 */
504 DEF_TEST(ImprovedBitmapFactory, reporter) { 504 DEF_TEST(ImprovedBitmapFactory, reporter) {
505 SkString resourcePath = skiatest::Test::GetResourcePath(); 505 SkString resourcePath = skiatest::Test::GetResourcePath();
506 SkString path = SkOSPath::SkPathJoin( 506 SkString path = SkOSPath::SkPathJoin(
507 resourcePath.c_str(), "randPixels.png"); 507 resourcePath.c_str(), "randPixels.png");
508 SkAutoTUnref<SkStreamRewindable> stream( 508 SkAutoTUnref<SkStreamRewindable> stream(
509 SkStream::NewFromFile(path.c_str())); 509 SkStream::NewFromFile(path.c_str()));
510 if (sk_exists(path.c_str())) { 510 if (sk_exists(path.c_str())) {
511 SkBitmap bm; 511 SkBitmap bm;
512 SkAssertResult(bm.setInfo(SkImageInfo::MakeN32Premul(1, 1))); 512 SkAssertResult(bm.setConfig(SkImageInfo::MakeN32Premul(1, 1)));
513 REPORTER_ASSERT(reporter, 513 REPORTER_ASSERT(reporter,
514 NULL != install_pixel_ref(&bm, stream.detach(), 1, true)); 514 NULL != install_pixel_ref(&bm, stream.detach(), 1, true));
515 SkAutoLockPixels alp(bm); 515 SkAutoLockPixels alp(bm);
516 REPORTER_ASSERT(reporter, NULL != bm.getPixels()); 516 REPORTER_ASSERT(reporter, NULL != bm.getPixels());
517 } 517 }
518 } 518 }
519 519
520 520
521 //////////////////////////////////////////////////////////////////////////////// 521 ////////////////////////////////////////////////////////////////////////////////
522 522
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } 719 }
720 SkDecodingImageGenerator::Options options(scaleList[i], 720 SkDecodingImageGenerator::Options options(scaleList[i],
721 ditherList[j]); 721 ditherList[j]);
722 test_options(reporter, options, encodedStream, encodedData, 722 test_options(reporter, options, encodedStream, encodedData,
723 useDataList[m], path); 723 useDataList[m], path);
724 } 724 }
725 } 725 }
726 } 726 }
727 } 727 }
728 } 728 }
OLDNEW
« no previous file with comments | « tests/CanvasTest.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698