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

Unified Diff: tests/ShaderOpacityTest.cpp

Issue 25275004: store SkAlphaType inside SkBitmap, on road to support unpremul (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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
« src/image/SkSurface_Gpu.cpp ('K') | « tests/DeferredCanvasTest.cpp ('k') | no next file » | 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 0af25d1ec21e9e09e7c79c49a248f1bce2357f53..c3dc888ba35098632b2fd7ab3669ea08fe62142f 100644
--- a/tests/ShaderOpacityTest.cpp
+++ b/tests/ShaderOpacityTest.cpp
@@ -32,7 +32,7 @@ static void test_bitmap(skiatest::Reporter* reporter) {
shader->unref();
// test 3: explicitly opaque
- bmp.setIsOpaque(true);
+ bmp.setAlphaType(kOpaque_SkAlphaType);
shader = SkShader::CreateBitmapShader(bmp,
SkShader::kClamp_TileMode, SkShader::kClamp_TileMode);
REPORTER_ASSERT(reporter, shader);
@@ -40,7 +40,7 @@ static void test_bitmap(skiatest::Reporter* reporter) {
shader->unref();
// test 4: explicitly not opaque
- bmp.setIsOpaque(false);
+ bmp.setAlphaType(kPremul_SkAlphaType);
shader = SkShader::CreateBitmapShader(bmp,
SkShader::kClamp_TileMode, SkShader::kClamp_TileMode);
REPORTER_ASSERT(reporter, shader);
« src/image/SkSurface_Gpu.cpp ('K') | « tests/DeferredCanvasTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698