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

Unified Diff: tests/DeferredCanvasTest.cpp

Issue 791763002: Revert of remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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/CanvasTest.cpp ('k') | tests/DrawBitmapRectTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/DeferredCanvasTest.cpp
diff --git a/tests/DeferredCanvasTest.cpp b/tests/DeferredCanvasTest.cpp
index 1c1970a03f00898bcc4861afd90ac41d3bc7167d..043fe3355756a57f57c868ed64ae34d1952fe2d4 100644
--- a/tests/DeferredCanvasTest.cpp
+++ b/tests/DeferredCanvasTest.cpp
@@ -32,7 +32,7 @@
}
static SkSurface* createSurface(SkColor color) {
- SkSurface* surface = SkSurface::NewRasterN32Premul(gWidth, gHeight);
+ SkSurface* surface = SkSurface::NewRasterPMColor(gWidth, gHeight);
surface->getCanvas()->clear(color);
return surface;
}
@@ -451,7 +451,7 @@
// Verifies that the deferred canvas triggers a flush when its memory
// limit is exceeded
static void TestDeferredCanvasMemoryLimit(skiatest::Reporter* reporter) {
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(100, 100));
+ SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterPMColor(100, 100));
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(surface.get()));
NotificationCounter notificationCounter;
@@ -486,7 +486,7 @@
}
static void TestDeferredCanvasBitmapCaching(skiatest::Reporter* reporter) {
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(100, 100));
+ SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterPMColor(100, 100));
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(surface.get()));
NotificationCounter notificationCounter;
@@ -566,7 +566,7 @@
}
static void TestDeferredCanvasSkip(skiatest::Reporter* reporter) {
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(100, 100));
+ SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterPMColor(100, 100));
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(surface.get()));
NotificationCounter notificationCounter;
@@ -585,7 +585,7 @@
// This test covers a code path that inserts bitmaps into the bitmap heap through the
// flattening of SkBitmapProcShaders. The refcount in the bitmap heap is maintained through
// the flattening and unflattening of the shader.
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(100, 100));
+ SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterPMColor(100, 100));
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(surface.get()));
// test will fail if nbIterations is not in sync with
// BITMAPS_TO_KEEP in SkGPipeWrite.cpp
@@ -620,7 +620,7 @@
}
static void TestDeferredCanvasBitmapSizeThreshold(skiatest::Reporter* reporter) {
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(100, 100));
+ SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterPMColor(100, 100));
SkBitmap sourceImage;
// 100 by 100 image, takes 40,000 bytes in memory
@@ -811,7 +811,7 @@
}
static void TestDeferredCanvasCreateCompatibleDevice(skiatest::Reporter* reporter) {
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(100, 100));
+ SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterPMColor(100, 100));
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(surface.get()));
NotificationCounter notificationCounter;
@@ -842,7 +842,7 @@
SkAutoTUnref<SkSurface> surface(createSurface(0xFFFFFFFF));
SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(surface.get()));
- SkSurface* newSurface = SkSurface::NewRasterN32Premul(4, 4);
+ SkSurface* newSurface = SkSurface::NewRasterPMColor(4, 4);
SkAutoTUnref<SkSurface> aur(newSurface);
for (int i = 0; i < 2; ++i) {
« no previous file with comments | « tests/CanvasTest.cpp ('k') | tests/DrawBitmapRectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698