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

Unified Diff: Source/core/platform/graphics/chromium/Canvas2DLayerBridgeTest.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/Canvas2DLayerBridgeTest.cpp
diff --git a/Source/core/platform/graphics/chromium/Canvas2DLayerBridgeTest.cpp b/Source/core/platform/graphics/chromium/Canvas2DLayerBridgeTest.cpp
index b7c83c4b47cc62d1ddcde47f324355a98eb76c11..7af3be0523371176c756197902fb1ac444e5890c 100644
--- a/Source/core/platform/graphics/chromium/Canvas2DLayerBridgeTest.cpp
+++ b/Source/core/platform/graphics/chromium/Canvas2DLayerBridgeTest.cpp
@@ -27,6 +27,7 @@
#include "core/platform/graphics/chromium/Canvas2DLayerBridge.h"
#include "SkDeferredCanvas.h"
+#include "SkSurface.h"
#include "core/platform/graphics/ImageBuffer.h"
#include "core/tests/FakeWebGraphicsContext3D.h"
#include "public/platform/Platform.h"
@@ -76,12 +77,17 @@ protected:
MockCanvasContext& mainMock = *static_cast<MockCanvasContext*>(mainContext->webContext());
- SkDevice device(SkBitmap::kARGB_8888_Config, 300, 150);
- SkDeferredCanvas canvas(&device);
+ SkImage::Info info = {
+ 300,
+ 150,
+ SkImage::kPMColor_ColorType,
+ SkImage::kPremul_AlphaType,
+ };
+ SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(SkSurface::NewRaster(info)));
::testing::Mock::VerifyAndClearExpectations(&mainMock);
- OwnPtr<Canvas2DLayerBridge> bridge = FakeCanvas2DLayerBridge::create(mainContext.release(), &canvas, Canvas2DLayerBridge::NonOpaque);
+ OwnPtr<Canvas2DLayerBridge> bridge = FakeCanvas2DLayerBridge::create(mainContext.release(), canvas.get(), Canvas2DLayerBridge::NonOpaque);
::testing::Mock::VerifyAndClearExpectations(&mainMock);

Powered by Google App Engine
This is Rietveld 408576698