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

Unified Diff: Source/core/platform/graphics/chromium/Canvas2DLayerManagerTest.cpp

Issue 22634006: Switching to SkDeferredCanvas factory API in preparation for constructor deprecation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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
Index: Source/core/platform/graphics/chromium/Canvas2DLayerManagerTest.cpp
diff --git a/Source/core/platform/graphics/chromium/Canvas2DLayerManagerTest.cpp b/Source/core/platform/graphics/chromium/Canvas2DLayerManagerTest.cpp
index 83dfa093a9c10d07469444f2e2a6dfe5bf4284a3..33e9ca69642579fbfb4e04a0152811091f6e91bb 100644
--- a/Source/core/platform/graphics/chromium/Canvas2DLayerManagerTest.cpp
+++ b/Source/core/platform/graphics/chromium/Canvas2DLayerManagerTest.cpp
@@ -27,6 +27,7 @@
#include "core/platform/graphics/chromium/Canvas2DLayerManager.h"
#include "SkDevice.h"
+#include "SkSurface.h"
#include "core/platform/graphics/GraphicsContext3D.h"
#include "core/tests/FakeWebGraphicsContext3D.h"
#include "public/platform/Platform.h"
@@ -90,8 +91,13 @@ public:
static PassOwnPtr<SkDeferredCanvas> createCanvas(GraphicsContext3D* context)
{
- SkAutoTUnref<SkDevice> device(new SkDevice(SkBitmap::kARGB_8888_Config, 1, 1));
- return adoptPtr(new SkDeferredCanvas(device.get()));
+ SkImage::Info info = {
+ 1,
+ 1,
+ SkImage::kPMColor_ColorType,
+ SkImage::kPremul_AlphaType,
+ };
+ return adoptPtr(SkDeferredCanvas::Create(SkSurface::NewRaster(info)));
}
class Canvas2DLayerManagerTest : public Test {

Powered by Google App Engine
This is Rietveld 408576698