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

Unified Diff: tests/PremulAlphaRoundTripTest.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/PipeTest.cpp ('k') | tests/QuickRejectTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PremulAlphaRoundTripTest.cpp
diff --git a/tests/PremulAlphaRoundTripTest.cpp b/tests/PremulAlphaRoundTripTest.cpp
index 77f62dcecd960432919cb256f7304304a3ed0e78..5e8e8bf1dd42843b8db5d9905b4812e1e4106f72 100644
--- a/tests/PremulAlphaRoundTripTest.cpp
+++ b/tests/PremulAlphaRoundTripTest.cpp
@@ -17,8 +17,7 @@
static void fillCanvas(SkCanvas* canvas, SkCanvas::Config8888 unpremulConfig) {
SkBitmap bmp;
- bmp.setConfig(SkBitmap::kARGB_8888_Config, 256, 256);
- bmp.allocPixels();
+ bmp.allocN32Pixels(256, 256);
SkAutoLockPixels alp(bmp);
uint32_t* pixels = reinterpret_cast<uint32_t*>(bmp.getPixels());
@@ -72,11 +71,9 @@ DEF_GPUTEST(PremulAlphaRoundTrip, reporter, factory) {
SkCanvas canvas(device);
SkBitmap readBmp1;
- readBmp1.setConfig(SkBitmap::kARGB_8888_Config, 256, 256);
- readBmp1.allocPixels();
+ readBmp1.allocN32Pixels(256, 256);
SkBitmap readBmp2;
- readBmp2.setConfig(SkBitmap::kARGB_8888_Config, 256, 256);
- readBmp2.allocPixels();
+ readBmp2.allocN32Pixels(256, 256);
for (size_t upmaIdx = 0;
upmaIdx < SK_ARRAY_COUNT(gUnpremulConfigs);
« no previous file with comments | « tests/PipeTest.cpp ('k') | tests/QuickRejectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698