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

Unified Diff: tests/SkResourceCacheTest.cpp

Issue 784223007: Remove 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/RecorderTest.cpp ('k') | tools/skhello.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/SkResourceCacheTest.cpp
diff --git a/tests/SkResourceCacheTest.cpp b/tests/SkResourceCacheTest.cpp
index 0e941758eede8bce9de3d51d53376eb9b398c3e7..e1f8a65bbca42b7d989e3dd56f3e88d357417dc5 100644
--- a/tests/SkResourceCacheTest.cpp
+++ b/tests/SkResourceCacheTest.cpp
@@ -11,6 +11,7 @@
#include "SkDiscardableMemoryPool.h"
#include "SkGraphics.h"
#include "SkResourceCache.h"
+#include "SkSurface.h"
static const int kCanvasSize = 1;
static const int kBitmapSize = 16;
@@ -27,8 +28,8 @@ static bool is_in_scaled_image_cache(const SkBitmap& orig,
// Draw a scaled bitmap, then return true iff it has been cached.
static bool test_scaled_image_cache_useage() {
- SkAutoTUnref<SkCanvas> canvas(
- SkCanvas::NewRasterN32(kCanvasSize, kCanvasSize));
+ SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(kCanvasSize, kCanvasSize));
+ SkCanvas* canvas = surface->getCanvas();
SkBitmap bitmap;
bitmap.allocN32Pixels(kBitmapSize, kBitmapSize);
bitmap.eraseColor(0xFFFFFFFF);
« no previous file with comments | « tests/RecorderTest.cpp ('k') | tools/skhello.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698