diff options
author | reed <reed@google.com> | 2014-12-10 07:24:28 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-10 07:24:28 -0800 |
commit | 3054be16dfdb0d06233770cbfc338958edef44ea (patch) | |
tree | ea2631250a39b25a550114491c9b980b47c14f70 /tests/SkResourceCacheTest.cpp | |
parent | 72b0c05fc19eb159c0adbf20ea87ded68c827ca3 (diff) |
Remove canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul
patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001)
BUG=skia:
TBR=
re-landing after chrome fixes have landed
Review URL: https://codereview.chromium.org/784223007
Diffstat (limited to 'tests/SkResourceCacheTest.cpp')
-rw-r--r-- | tests/SkResourceCacheTest.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/SkResourceCacheTest.cpp b/tests/SkResourceCacheTest.cpp index 0e941758ee..e1f8a65bbc 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); |