aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SkResourceCacheTest.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2014-12-09 13:55:20 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-09 13:55:20 -0800
commita8918a065075dece6e407cce0dfddf110e5d61a9 (patch)
treeefb420e47b1b7838e1381d5ee56724863f9d97dc /tests/SkResourceCacheTest.cpp
parent2e3b3e369d79e78f7635d4c20e83a47ab571bdf2 (diff)
Revert of remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul (patchset #3 id:40001 of https://codereview.chromium.org/790733003/)
Reason for revert: need to update chrome first Original issue's description: > remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul > > patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001) > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/2c1605a1fbaa2e35a27399a34254fb1200ec2ae6 TBR=fmalita@google.com,fmalita@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/791763002
Diffstat (limited to 'tests/SkResourceCacheTest.cpp')
-rw-r--r--tests/SkResourceCacheTest.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/SkResourceCacheTest.cpp b/tests/SkResourceCacheTest.cpp
index e1f8a65bbc..0e941758ee 100644
--- a/tests/SkResourceCacheTest.cpp
+++ b/tests/SkResourceCacheTest.cpp
@@ -11,7 +11,6 @@
#include "SkDiscardableMemoryPool.h"
#include "SkGraphics.h"
#include "SkResourceCache.h"
-#include "SkSurface.h"
static const int kCanvasSize = 1;
static const int kBitmapSize = 16;
@@ -28,8 +27,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<SkSurface> surface(SkSurface::NewRasterN32Premul(kCanvasSize, kCanvasSize));
- SkCanvas* canvas = surface->getCanvas();
+ SkAutoTUnref<SkCanvas> canvas(
+ SkCanvas::NewRasterN32(kCanvasSize, kCanvasSize));
SkBitmap bitmap;
bitmap.allocN32Pixels(kBitmapSize, kBitmapSize);
bitmap.eraseColor(0xFFFFFFFF);