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

Unified Diff: tests/ShaderOpacityTest.cpp

Issue 162643002: replace setConfig+allocPixels with single call (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/ShaderImageFilterTest.cpp ('k') | tests/SkpSkGrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ShaderOpacityTest.cpp
diff --git a/tests/ShaderOpacityTest.cpp b/tests/ShaderOpacityTest.cpp
index 5230e4a0fadbfd75f81a34814642f51e694362b9..e55560365a8c7e00c58b780cd9db4b6c9e222e26 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,
« no previous file with comments | « tests/ShaderImageFilterTest.cpp ('k') | tests/SkpSkGrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698