aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PipeTest.cpp
diff options
context:
space:
mode:
authorGravatar mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-13 14:41:43 +0000
committerGravatar mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-13 14:41:43 +0000
commitdeee496cd30070e52556dcb538c2e5eb39b66b81 (patch)
tree80f0326a191c966bc34057e4011bdb3233bc2a50 /tests/PipeTest.cpp
parentb720ffd20829953c9595980422969520f5e33c76 (diff)
replace setConfig+allocPixels with single call
BUG=skia: Review URL: https://codereview.chromium.org/162643002 git-svn-id: http://skia.googlecode.com/svn/trunk@13426 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/PipeTest.cpp')
-rw-r--r--tests/PipeTest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/PipeTest.cpp b/tests/PipeTest.cpp
index 6ab4d8eb4b..fd98fca7ef 100644
--- a/tests/PipeTest.cpp
+++ b/tests/PipeTest.cpp
@@ -16,7 +16,8 @@
// Ensures that the pipe gracefully handles drawing an invalid bitmap.
static void testDrawingBadBitmap(SkCanvas* pipeCanvas) {
SkBitmap badBitmap;
- badBitmap.setConfig(SkBitmap::kNo_Config, 5, 5);
+ badBitmap.setConfig(SkImageInfo::Make(5, 5, kUnknown_SkColorType,
+ kPremul_SkAlphaType));
pipeCanvas->drawBitmap(badBitmap, 0, 0);
}
@@ -29,8 +30,7 @@ static void testDrawingAfterEndRecording(SkCanvas* canvas) {
writer.endRecording();
SkBitmap bm;
- bm.setConfig(SkBitmap::kARGB_8888_Config, 2, 2);
- bm.allocPixels();
+ bm.allocN32Pixels(2, 2);
bm.eraseColor(SK_ColorTRANSPARENT);
SkShader* shader = SkShader::CreateBitmapShader(bm, SkShader::kClamp_TileMode,
@@ -44,7 +44,7 @@ static void testDrawingAfterEndRecording(SkCanvas* canvas) {
DEF_TEST(Pipe, reporter) {
SkBitmap bitmap;
- bitmap.setConfig(SkBitmap::kARGB_8888_Config, 64, 64);
+ bitmap.setConfig(SkImageInfo::MakeN32Premul(64, 64));
SkCanvas canvas(bitmap);
PipeController pipeController(&canvas);