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

Unified Diff: tests/BitmapCopyTest.cpp

Issue 25275004: store SkAlphaType inside SkBitmap, on road to support unpremul (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove occurances of setIsOpaque Created 7 years, 3 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
Index: tests/BitmapCopyTest.cpp
diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp
index 88ce577f682aa974c60b54081829c3f9e4fc0382..c6664261da4ad575cab8cc0ae2ac203cc48fd817 100644
--- a/tests/BitmapCopyTest.cpp
+++ b/tests/BitmapCopyTest.cpp
@@ -43,7 +43,7 @@ static void test_isOpaque(skiatest::Reporter* reporter, const SkBitmap& src,
unsigned ctableFlags = ctable ? ctable->getFlags() : 0;
if (canHaveAlpha(bitmap.config()) && canHaveAlpha(dstConfig)) {
- bitmap.setIsOpaque(false);
+ bitmap.setAlphaType(kPremul_SkAlphaType);
if (ctable) {
ctable->setFlags(ctableFlags & ~SkColorTable::kColorsAreOpaque_Flag);
}
@@ -54,7 +54,7 @@ static void test_isOpaque(skiatest::Reporter* reporter, const SkBitmap& src,
}
}
- bitmap.setIsOpaque(true);
+ bitmap.setAlphaType(kOpaque_SkAlphaType);
if (ctable) {
ctable->setFlags(ctableFlags | SkColorTable::kColorsAreOpaque_Flag);
}
@@ -311,7 +311,7 @@ static void TestBitmapCopy(skiatest::Reporter* reporter) {
SkBitmap subset;
SkIRect r;
r.set(1, 1, 2, 2);
- bitmap.setIsOpaque(true);
+ bitmap.setAlphaType(kOpaque_SkAlphaType);
bitmap.setIsVolatile(true);
if (bitmap.extractSubset(&subset, r)) {
REPORTER_ASSERT(reporter, subset.width() == 1);
@@ -335,7 +335,7 @@ static void TestBitmapCopy(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter,
(copy.getColorTable() != NULL) == hasCT);
}
- bitmap.setIsOpaque(false);
+ bitmap.setAlphaType(kPremul_SkAlphaType);
bitmap.setIsVolatile(false);
if (bitmap.extractSubset(&subset, r)) {
REPORTER_ASSERT(reporter,

Powered by Google App Engine
This is Rietveld 408576698