Revert "makeSurface defaults to raster"
This reverts commit 29a4a684af2525d78a1090fba2d3dea2b6a59fc7.
Reason for revert: some configs fail
Original change's description:
> makeSurface defaults to raster
>
> Rather that returning nullptr for a recording
> canvas, return a raster canvas instead.
>
> R=​reed@google.com,robertphillips@google.com
>
> Bug: skia:
> Change-Id: I211d8ef368b9aec6d14cc72d1652ac6a03f3fa7b
> Reviewed-on: https://skia-review.googlesource.com/151666
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=robertphillips@google.com,reed@google.com,caryclark@skia.org
Change-Id: I82d2c3e4589a2ca8523bbf86884ed68b1431631d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/151824
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index d1e692f..9566a34 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1158,14 +1158,7 @@
sk_sp<SkSurface> SkCanvas::onNewSurface(const SkImageInfo& info, const SkSurfaceProps& props) {
SkBaseDevice* dev = this->getDevice();
- sk_sp<SkSurface> result = nullptr;
- if (dev) {
- result = dev->makeSurface(info, props);
- }
- if (!result) {
- result = SkSurface::MakeRaster(info, 0, &props);
- }
- return result;
+ return dev ? dev->makeSurface(info, props) : nullptr;
}
SkImageInfo SkCanvas::imageInfo() const {