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

Side by Side Diff: tests/CanvasTest.cpp

Issue 301283003: Revert "Revert of setConfig -> setInfo (https://codereview.chromium.org/308683005/)" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add guard for android 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/BitmapTest.cpp ('k') | tests/ImageDecodingTest.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 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 private: 96 private:
97 SkCanvas* fTarget; 97 SkCanvas* fTarget;
98 }; 98 };
99 99
100 static void test_clipVisitor(skiatest::Reporter* reporter, SkCanvas* canvas) { 100 static void test_clipVisitor(skiatest::Reporter* reporter, SkCanvas* canvas) {
101 SkISize size = canvas->getDeviceSize(); 101 SkISize size = canvas->getDeviceSize();
102 102
103 SkBitmap bm; 103 SkBitmap bm;
104 bm.setConfig(SkImageInfo::MakeN32Premul(size.width(), size.height())); 104 bm.setInfo(SkImageInfo::MakeN32Premul(size.width(), size.height()));
105 SkCanvas c(bm); 105 SkCanvas c(bm);
106 106
107 Canvas2CanvasClipVisitor visitor(&c); 107 Canvas2CanvasClipVisitor visitor(&c);
108 canvas->replayClips(&visitor); 108 canvas->replayClips(&visitor);
109 109
110 REPORTER_ASSERT(reporter, equal_clips(c, *canvas)); 110 REPORTER_ASSERT(reporter, equal_clips(c, *canvas));
111 } 111 }
112 112
113 static const int kWidth = 2; 113 static const int kWidth = 2;
114 static const int kHeight = 2; 114 static const int kHeight = 2;
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 if (testStepArray()[testStep]->enablePdfTesting()) { 952 if (testStepArray()[testStep]->enablePdfTesting()) {
953 TestPdfDevice(reporter, testStepArray()[testStep]); 953 TestPdfDevice(reporter, testStepArray()[testStep]);
954 } 954 }
955 } 955 }
956 956
957 // Explicitly call reset(), so we don't leak the pixels (since kTestBitmap i s a global) 957 // Explicitly call reset(), so we don't leak the pixels (since kTestBitmap i s a global)
958 kTestBitmap.reset(); 958 kTestBitmap.reset();
959 959
960 test_newraster(reporter); 960 test_newraster(reporter);
961 } 961 }
OLDNEW
« no previous file with comments | « tests/BitmapTest.cpp ('k') | tests/ImageDecodingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698