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

Unified Diff: tests/DrawTextTest.cpp

Issue 184233003: remove deprecated use of bitmap config from tests (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/BlitRowTest.cpp ('k') | tests/FontHostStreamTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/DrawTextTest.cpp
diff --git a/tests/DrawTextTest.cpp b/tests/DrawTextTest.cpp
index bafd2cb5e28fd66f2a6dbff1e557011d49725e68..3a96c4ff2d8cb3621c952ccac24ca0a2495e17c2 100644
--- a/tests/DrawTextTest.cpp
+++ b/tests/DrawTextTest.cpp
@@ -16,9 +16,8 @@
static const SkColor bgColor = SK_ColorWHITE;
-static void create(SkBitmap* bm, SkIRect bound, SkBitmap::Config config) {
- bm->setConfig(config, bound.width(), bound.height());
- bm->allocPixels();
+static void create(SkBitmap* bm, SkIRect bound) {
+ bm->allocN32Pixels(bound.width(), bound.height());
}
static void drawBG(SkCanvas* canvas) {
@@ -67,12 +66,12 @@ DEF_TEST(DrawText, reporter) {
SkIRect drawTextRect = SkIRect::MakeWH(64, 64);
SkBitmap drawTextBitmap;
- create(&drawTextBitmap, drawTextRect, SkBitmap::kARGB_8888_Config);
+ create(&drawTextBitmap, drawTextRect);
SkCanvas drawTextCanvas(drawTextBitmap);
SkIRect drawPosTextRect = SkIRect::MakeWH(64, 64);
SkBitmap drawPosTextBitmap;
- create(&drawPosTextBitmap, drawPosTextRect, SkBitmap::kARGB_8888_Config);
+ create(&drawPosTextBitmap, drawPosTextRect);
SkCanvas drawPosTextCanvas(drawPosTextBitmap);
for (float offsetY = 0.0f; offsetY < 1.0f; offsetY += (1.0f / 16.0f)) {
« no previous file with comments | « tests/BlitRowTest.cpp ('k') | tests/FontHostStreamTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698