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

Unified Diff: tests/GradientTest.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/FlatDataTest.cpp ('k') | tests/ImageCacheTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GradientTest.cpp
diff --git a/tests/GradientTest.cpp b/tests/GradientTest.cpp
index 8a250fab799b97429dc393466d6548007ae50f49..3e400103fbd1f1e56f465f08ce06b049676eece2 100644
--- a/tests/GradientTest.cpp
+++ b/tests/GradientTest.cpp
@@ -142,12 +142,10 @@ static void TestConstantGradient(skiatest::Reporter*) {
2,
SkShader::kClamp_TileMode));
SkBitmap outBitmap;
- outBitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 1);
- outBitmap.allocPixels();
+ outBitmap.allocN32Pixels(10, 1);
SkPaint paint;
paint.setShader(s.get());
- SkBitmapDevice device(outBitmap);
- SkCanvas canvas(&device);
+ SkCanvas canvas(outBitmap);
canvas.drawPaint(paint);
SkAutoLockPixels alp(outBitmap);
for (int i = 0; i < 10; i++) {
« no previous file with comments | « tests/FlatDataTest.cpp ('k') | tests/ImageCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698