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

Side by Side Diff: tests/ImageTest.cpp

Issue 1783633002: un-restore test, as bug is not fixed (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | 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 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 <functional> 8 #include <functional>
9 #include "DMGpuSupport.h" 9 #include "DMGpuSupport.h"
10 10
(...skipping 13 matching lines...) Expand all
24 #include "SkUtils.h" 24 #include "SkUtils.h"
25 #include "Test.h" 25 #include "Test.h"
26 26
27 static void assert_equal(skiatest::Reporter* reporter, SkImage* a, const SkIRect * subsetA, 27 static void assert_equal(skiatest::Reporter* reporter, SkImage* a, const SkIRect * subsetA,
28 SkImage* b) { 28 SkImage* b) {
29 const int widthA = subsetA ? subsetA->width() : a->width(); 29 const int widthA = subsetA ? subsetA->width() : a->width();
30 const int heightA = subsetA ? subsetA->height() : a->height(); 30 const int heightA = subsetA ? subsetA->height() : a->height();
31 31
32 REPORTER_ASSERT(reporter, widthA == b->width()); 32 REPORTER_ASSERT(reporter, widthA == b->width());
33 REPORTER_ASSERT(reporter, heightA == b->height()); 33 REPORTER_ASSERT(reporter, heightA == b->height());
34 REPORTER_ASSERT(reporter, a->isOpaque() == b->isOpaque()); 34
35 // see https://bug.skia.org/3965
36 //REPORTER_ASSERT(reporter, a->isOpaque() == b->isOpaque());
35 37
36 SkImageInfo info = SkImageInfo::MakeN32(widthA, heightA, 38 SkImageInfo info = SkImageInfo::MakeN32(widthA, heightA,
37 a->isOpaque() ? kOpaque_SkAlphaType : kP remul_SkAlphaType); 39 a->isOpaque() ? kOpaque_SkAlphaType : kP remul_SkAlphaType);
38 SkAutoPixmapStorage pmapA, pmapB; 40 SkAutoPixmapStorage pmapA, pmapB;
39 pmapA.alloc(info); 41 pmapA.alloc(info);
40 pmapB.alloc(info); 42 pmapB.alloc(info);
41 43
42 const int srcX = subsetA ? subsetA->x() : 0; 44 const int srcX = subsetA ? subsetA->x() : 0;
43 const int srcY = subsetA ? subsetA->y() : 0; 45 const int srcY = subsetA ? subsetA->y() : 0;
44 46
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 check_image_color(reporter, refImg, expected1); 727 check_image_color(reporter, refImg, expected1);
726 #endif 728 #endif
727 check_image_color(reporter, cpyImg, expected0); 729 check_image_color(reporter, cpyImg, expected0);
728 730
729 // Now exercise the release proc 731 // Now exercise the release proc
730 REPORTER_ASSERT(reporter, 0 == releaseChecker.fReleaseCount); 732 REPORTER_ASSERT(reporter, 0 == releaseChecker.fReleaseCount);
731 refImg.reset(nullptr); // force a release of the image 733 refImg.reset(nullptr); // force a release of the image
732 REPORTER_ASSERT(reporter, 1 == releaseChecker.fReleaseCount); 734 REPORTER_ASSERT(reporter, 1 == releaseChecker.fReleaseCount);
733 } 735 }
734 #endif 736 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698