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

Side by Side Diff: tests/CanvasTest.cpp

Issue 324293004: Remove picture pre-allocation from SkPictureRecorder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix initializer list order 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
« no previous file with comments | « src/core/SkPictureRecorder.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 /* Description: 8 /* Description:
9 * This test defines a series of elementatry test steps that perform 9 * This test defines a series of elementatry test steps that perform
10 * a single or a small group of canvas API calls. Each test step is 10 * a single or a small group of canvas API calls. Each test step is
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 testRecord->fBitmapHeap->count(), testStep->assertMessage()); 685 testRecord->fBitmapHeap->count(), testStep->assertMessage());
686 REPORTER_ASSERT_MESSAGE(reporter, 686 REPORTER_ASSERT_MESSAGE(reporter,
687 referenceRecord->fPaints.count() == 687 referenceRecord->fPaints.count() ==
688 testRecord->fPaints.count(), testStep->assertMessage()); 688 testRecord->fPaints.count(), testStep->assertMessage());
689 for (int i = 0; i < referenceRecord->fPaints.count(); ++i) { 689 for (int i = 0; i < referenceRecord->fPaints.count(); ++i) {
690 REPORTER_ASSERT_MESSAGE(reporter, 690 REPORTER_ASSERT_MESSAGE(reporter,
691 EQ(referenceRecord->fPaints[i], testRecord->fPaints[i]), 691 EQ(referenceRecord->fPaints[i], testRecord->fPaints[i]),
692 testStep->assertMessage()); 692 testStep->assertMessage());
693 } 693 }
694 REPORTER_ASSERT_MESSAGE(reporter, 694 REPORTER_ASSERT_MESSAGE(reporter,
695 !referenceRecord->fPicture->fPathHeap == 695 !referenceRecord->fPathHeap == !testRecord->fPathHeap,
696 !testRecord->fPicture->fPathHeap,
697 testStep->assertMessage()); 696 testStep->assertMessage());
698 // The following tests are commented out because they currently 697 // The following tests are commented out because they currently
699 // fail. Issue: http://code.google.com/p/skia/issues/detail?id=507 698 // fail. Issue: http://code.google.com/p/skia/issues/detail?id=507
700 /* 699 /*
701 if (referenceRecord->fPathHeap) { 700 if (referenceRecord->fPathHeap) {
702 REPORTER_ASSERT_MESSAGE(reporter, 701 REPORTER_ASSERT_MESSAGE(reporter,
703 referenceRecord->fPathHeap->count() == 702 referenceRecord->fPathHeap->count() ==
704 testRecord->fPathHeap->count(), 703 testRecord->fPathHeap->count(),
705 testStep->assertMessage()); 704 testStep->assertMessage());
706 for (int i = 0; i < referenceRecord->fPathHeap->count(); ++i) { 705 for (int i = 0; i < referenceRecord->fPathHeap->count(); ++i) {
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 if (testStepArray()[testStep]->enablePdfTesting()) { 948 if (testStepArray()[testStep]->enablePdfTesting()) {
950 TestPdfDevice(reporter, testStepArray()[testStep]); 949 TestPdfDevice(reporter, testStepArray()[testStep]);
951 } 950 }
952 } 951 }
953 952
954 // Explicitly call reset(), so we don't leak the pixels (since kTestBitmap i s a global) 953 // Explicitly call reset(), so we don't leak the pixels (since kTestBitmap i s a global)
955 kTestBitmap.reset(); 954 kTestBitmap.reset();
956 955
957 test_newraster(reporter); 956 test_newraster(reporter);
958 } 957 }
OLDNEW
« no previous file with comments | « src/core/SkPictureRecorder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698