aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ShaderOpacityTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ShaderOpacityTest.cpp')
-rw-r--r--tests/ShaderOpacityTest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/ShaderOpacityTest.cpp b/tests/ShaderOpacityTest.cpp
index 5230e4a0fa..e55560365a 100644
--- a/tests/ShaderOpacityTest.cpp
+++ b/tests/ShaderOpacityTest.cpp
@@ -11,8 +11,10 @@
#include "Test.h"
static void test_bitmap(skiatest::Reporter* reporter) {
+ SkImageInfo info = SkImageInfo::MakeN32Premul(2, 2);
+
SkBitmap bmp;
- bmp.setConfig(SkBitmap::kARGB_8888_Config, 2, 2);
+ bmp.setConfig(info);
// test 1: bitmap without pixel data
SkShader* shader = SkShader::CreateBitmapShader(bmp,
@@ -22,7 +24,7 @@ static void test_bitmap(skiatest::Reporter* reporter) {
shader->unref();
// From this point on, we have pixels
- bmp.allocPixels();
+ bmp.allocPixels(info);
// test 2: not opaque by default
shader = SkShader::CreateBitmapShader(bmp,