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

Side by Side Diff: tests/CanvasTest.cpp

Issue 143883006: No deduping dictionaries for matrices and regions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bump picture version Created 6 years, 11 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 | « src/effects/SkEmbossMaskFilter.cpp ('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 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 /* Description: 9 /* Description:
10 * This test defines a series of elementatry test steps that perform 10 * This test defines a series of elementatry test steps that perform
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 static void AssertFlattenedObjectsEqual( 662 static void AssertFlattenedObjectsEqual(
663 SkPictureRecord* referenceRecord, 663 SkPictureRecord* referenceRecord,
664 SkPictureRecord* testRecord, 664 SkPictureRecord* testRecord,
665 skiatest::Reporter* reporter, 665 skiatest::Reporter* reporter,
666 CanvasTestStep* testStep) { 666 CanvasTestStep* testStep) {
667 667
668 REPORTER_ASSERT_MESSAGE(reporter, 668 REPORTER_ASSERT_MESSAGE(reporter,
669 referenceRecord->fBitmapHeap->count() == 669 referenceRecord->fBitmapHeap->count() ==
670 testRecord->fBitmapHeap->count(), testStep->assertMessage()); 670 testRecord->fBitmapHeap->count(), testStep->assertMessage());
671 REPORTER_ASSERT_MESSAGE(reporter, 671 REPORTER_ASSERT_MESSAGE(reporter,
672 referenceRecord->fMatrices.count() ==
673 testRecord->fMatrices.count(), testStep->assertMessage());
674 for (int i = 0; i < referenceRecord->fMatrices.count(); ++i) {
675 REPORTER_ASSERT_MESSAGE(reporter,
676 EQ(referenceRecord->fMatrices[i], testRecord->fMatrices[i]),
677 testStep->assertMessage());
678 }
679 REPORTER_ASSERT_MESSAGE(reporter,
680 referenceRecord->fPaints.count() == 672 referenceRecord->fPaints.count() ==
681 testRecord->fPaints.count(), testStep->assertMessage()); 673 testRecord->fPaints.count(), testStep->assertMessage());
682 for (int i = 0; i < referenceRecord->fPaints.count(); ++i) { 674 for (int i = 0; i < referenceRecord->fPaints.count(); ++i) {
683 REPORTER_ASSERT_MESSAGE(reporter, 675 REPORTER_ASSERT_MESSAGE(reporter,
684 EQ(referenceRecord->fPaints[i], testRecord->fPaints[i]), 676 EQ(referenceRecord->fPaints[i], testRecord->fPaints[i]),
685 testStep->assertMessage()); 677 testStep->assertMessage());
686 } 678 }
687 REPORTER_ASSERT_MESSAGE(reporter, 679 REPORTER_ASSERT_MESSAGE(reporter,
688 referenceRecord->fRegions.count() ==
689 testRecord->fRegions.count(), testStep->assertMessage());
690 for (int i = 0; i < referenceRecord->fRegions.count(); ++i) {
691 REPORTER_ASSERT_MESSAGE(reporter,
692 EQ(referenceRecord->fRegions[i], testRecord->fRegions[i]),
693 testStep->assertMessage());
694 }
695 REPORTER_ASSERT_MESSAGE(reporter,
696 !referenceRecord->fPathHeap == 680 !referenceRecord->fPathHeap ==
697 !testRecord->fPathHeap, 681 !testRecord->fPathHeap,
698 testStep->assertMessage()); 682 testStep->assertMessage());
699 // The following tests are commented out because they currently 683 // The following tests are commented out because they currently
700 // fail. Issue: http://code.google.com/p/skia/issues/detail?id=507 684 // fail. Issue: http://code.google.com/p/skia/issues/detail?id=507
701 /* 685 /*
702 if (referenceRecord->fPathHeap) { 686 if (referenceRecord->fPathHeap) {
703 REPORTER_ASSERT_MESSAGE(reporter, 687 REPORTER_ASSERT_MESSAGE(reporter,
704 referenceRecord->fPathHeap->count() == 688 referenceRecord->fPathHeap->count() ==
705 testRecord->fPathHeap->count(), 689 testRecord->fPathHeap->count(),
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 SkPictureTester::TestPictureFlattenedObjectReuse(reporter, 895 SkPictureTester::TestPictureFlattenedObjectReuse(reporter,
912 testStepArray()[testStep], 0); 896 testStepArray()[testStep], 0);
913 if (testStepArray()[testStep]->enablePdfTesting()) { 897 if (testStepArray()[testStep]->enablePdfTesting()) {
914 TestPdfDevice(reporter, testStepArray()[testStep]); 898 TestPdfDevice(reporter, testStepArray()[testStep]);
915 } 899 }
916 } 900 }
917 901
918 // Explicitly call reset(), so we don't leak the pixels (since kTestBitmap i s a global) 902 // Explicitly call reset(), so we don't leak the pixels (since kTestBitmap i s a global)
919 kTestBitmap.reset(); 903 kTestBitmap.reset();
920 } 904 }
OLDNEW
« no previous file with comments | « src/effects/SkEmbossMaskFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698