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

Unified Diff: tests/ResourceCacheTest.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/QuickRejectTest.cpp ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ResourceCacheTest.cpp
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index b60cde97bace54607109dd2be74e0e36f3cbe9d6..6b324a7d8471e8b3bd0398ccd7d3f6de8f6dcf13 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -22,8 +22,7 @@ static void test_cache(skiatest::Reporter* reporter,
const SkIRect size = SkIRect::MakeWH(gWidth, gHeight);
SkBitmap src;
- src.setConfig(SkBitmap::kARGB_8888_Config, size.width(), size.height());
- src.allocPixels();
+ src.allocN32Pixels(size.width(), size.height());
src.eraseColor(SK_ColorBLACK);
size_t srcSize = src.getSize();
@@ -39,8 +38,7 @@ static void test_cache(skiatest::Reporter* reporter,
context->setTextureCacheLimits(1000, maxCacheSize);
SkBitmap readback;
- readback.setConfig(SkBitmap::kARGB_8888_Config, size.width(), size.height());
- readback.allocPixels();
+ readback.allocN32Pixels(size.width(), size.height());
for (int i = 0; i < 100; ++i) {
canvas->drawBitmap(src, 0, 0);
« no previous file with comments | « tests/QuickRejectTest.cpp ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698