| 1 |
/* |
| 2 |
* Copyright 2014 Google Inc. |
| 3 |
* |
| 4 |
* Use of this source code is governed by a BSD-style license that can be |
| 5 |
* found in the LICENSE file. |
| 6 |
*/ |
| 7 |
|
| 8 |
#include "src/core/SkRecordCanvas.h" |
| 9 |
|
| 10 |
#include "include/core/SkCanvas.h" |
| 11 |
#include "include/core/SkData.h" |
| 12 |
#include "include/core/SkDrawable.h" |
| 13 |
#include "include/core/SkImage.h" |
| 14 |
#include "include/core/SkImageFilter.h" |
| 15 |
#include "include/core/SkImageInfo.h" |
| 16 |
#include "include/core/SkMatrix.h" |
| 17 |
#include "include/core/SkPaint.h" |
| 18 |
#include "include/core/SkPicture.h" |
| 19 |
#include "include/core/SkPoint.h" |
| 20 |
#include "include/core/SkRSXform.h" |
| 21 |
#include "include/core/SkRect.h" |
| 22 |
#include "include/core/SkShader.h" |
| 23 |
#include "include/core/SkString.h" |
| 24 |
#include "include/core/SkSurface.h" |
| 25 |
#include "include/core/SkTextBlob.h" |
| 26 |
#include "include/core/SkVertices.h" |
| 27 |
#include "include/private/base/SkFloatingPoint.h" |
| 28 |
#include "include/private/base/SkTemplates.h" |
| 29 |
#include "include/private/base/SkTo.h" |
| 30 |
#include "include/private/chromium/Slug.h" |
| 31 |
#include "src/core/SkBigPicture.h" |
| 32 |
#include "src/core/SkCanvasPriv.h" |
| 33 |
#include "src/core/SkRecord.h" |
| 34 |
#include "src/core/SkRecords.h" |
| 35 |
#include "src/text/GlyphRun.h" |
| 36 |
#include "src/utils/SkPatchUtils.h" |
| 37 |
|
| 38 |
#include <cstdint> |
| 39 |
#include <cstring> |
| 40 |
#include <memory> |
| 41 |
#include <new> |
| 42 |
|
| 43 |
class SkBlender; |
| 44 |
class SkMesh; |
| 45 |
class SkPath; |
| 46 |
class SkRRect; |
| 47 |
class SkRegion; |
| 48 |
class SkSurfaceProps; |
| 49 |
enum class SkBlendMode; |
| 50 |
enum class SkClipOp; |
| 51 |
struct SkDrawShadowRec; |
| 52 |
|
| 53 |
using namespace skia_private; |
| 54 |
|
| 55 |
SkDrawableList::~SkDrawableList() { |
| 56 |
for (SkDrawable* p : fArray) { |
| 57 |
p->unref(); |
| 58 |
} |
| 59 |
fArray.reset(); |
| 60 |
} |
| 61 |
|
| 62 |
SkBigPicture::SnapshotArray* SkDrawableList::newDrawableSnapshot() { |
| 63 |
const int count = fArray.size(); |
| 64 |
if (0 == count) { |
| 65 |
return nullptr; |
| 66 |
} |
| 67 |
AutoTMalloc<const SkPicture*> pics(count); |
| 68 |
for (int i = 0; i < count; ++i) { |
| 69 |
pics[i] = fArray[i]->makePictureSnapshot().release(); |
| 70 |
} |
| 71 |
return new SkBigPicture::SnapshotArray(pics.release(), count); |
| 72 |
} |
| 73 |
|
| 74 |
void SkDrawableList::append(SkDrawable* drawable) { *fArray.append() = SkRef(drawable); } |
| 75 |
|
| 76 |
/////////////////////////////////////////////////////////////////////////////////////////////// |
| 77 |
|
| 78 |
static SkIRect safe_picture_bounds(const SkRect& bounds) { |
| 79 |
SkIRect picBounds = bounds.roundOut(); |
| 80 |
// roundOut() saturates the float edges to +/-SK_MaxS32FitsInFloat (~2billion), but this is |
| 81 |
// large enough that width/height calculations will overflow, leading to negative dimensions. |
| 82 |
static constexpr int32_t kSafeEdge = SK_MaxS32FitsInFloat / 2 - 1; |
| 83 |
static constexpr SkIRect kSafeBounds = {-kSafeEdge, -kSafeEdge, kSafeEdge, kSafeEdge}; |
| 84 |
static_assert((kSafeBounds.fRight - kSafeBounds.fLeft) >= 0 && |
| 85 |
(kSafeBounds.fBottom - kSafeBounds.fTop) >= 0); |
| 86 |
if (!picBounds.intersect(kSafeBounds)) { |
| 87 |
picBounds.setEmpty(); |
| 88 |
} |
| 89 |
return picBounds; |
| 90 |
} |
| 91 |
|
| 92 |
SkRecordCanvas::SkRecordCanvas(SkRecord* record, int width, int height) |
| 93 |
: SkCanvasVirtualEnforcer<SkNoDrawCanvas>(width, height) |
| 94 |
, fApproxBytesUsedBySubPictures(0) |
| 95 |
, fRecord(record) { |
| 96 |
SkASSERT(this->imageInfo().width() >= 0 && this->imageInfo().height() >= 0); |
| 97 |
} |
| 98 |
|
| 99 |
SkRecordCanvas::SkRecordCanvas(SkRecord* record, const SkRect& bounds) |
| 100 |
: SkCanvasVirtualEnforcer<SkNoDrawCanvas>(safe_picture_bounds(bounds)) |
| 101 |
, fApproxBytesUsedBySubPictures(0) |
| 102 |
, fRecord(record) { |
| 103 |
SkASSERT(this->imageInfo().width() >= 0 && this->imageInfo().height() >= 0); |
| 104 |
} |
| 105 |
|
| 106 |
void SkRecordCanvas::reset(SkRecord* record, const SkRect& bounds) { |
| 107 |
this->forgetRecord(); |
| 108 |
fRecord = record; |
| 109 |
this->resetCanvas(safe_picture_bounds(bounds)); |
| 110 |
SkASSERT(this->imageInfo().width() >= 0 && this->imageInfo().height() >= 0); |
| 111 |
} |
| 112 |
|
| 113 |
void SkRecordCanvas::forgetRecord() { |
| 114 |
fDrawableList.reset(nullptr); |
| 115 |
fApproxBytesUsedBySubPictures = 0; |
| 116 |
fRecord = nullptr; |
| 117 |
} |
| 118 |
|
| 119 |
// To make appending to fRecord a little less verbose. |
| 120 |
template <typename T, typename... Args> void SkRecordCanvas::append(Args&&... args) { |
| 121 |
new (fRecord->append<T>()) T{std::forward<Args>(args)...}; |
| 122 |
} |
| 123 |
|
| 124 |
// For methods which must call back into SkNoDrawCanvas. |
| 125 |
#define INHERITED(method, ...) this->SkNoDrawCanvas::method(__VA_ARGS__) |
| 126 |
|
| 127 |
// Use copy() only for optional arguments, to be copied if present or skipped if not. |
| 128 |
// (For most types we just pass by value and let copy constructors do their thing.) |
| 129 |
template <typename T> T* SkRecordCanvas::copy(const T* src) { |
| 130 |
if (nullptr == src) { |
| 131 |
return nullptr; |
| 132 |
} |
| 133 |
return new (fRecord->alloc<T>()) T(*src); |
| 134 |
} |
| 135 |
|
| 136 |
// This copy() is for arrays. |
| 137 |
// It will work with POD or non-POD, though currently we only use it for POD. |
| 138 |
template <typename T> T* SkRecordCanvas::copy(const T src[], size_t count) { |
| 139 |
if (nullptr == src) { |
| 140 |
return nullptr; |
| 141 |
} |
| 142 |
T* dst = fRecord->alloc<T>(count); |
| 143 |
for (size_t i = 0; i < count; i++) { |
| 144 |
new (dst + i) T(src[i]); |
| 145 |
} |
| 146 |
return dst; |
| 147 |
} |
| 148 |
|
| 149 |
// Specialization for copying strings, using memcpy. |
| 150 |
// This measured around 2x faster for copying code points, |
| 151 |
// but I found no corresponding speedup for other arrays. |
| 152 |
template <> char* SkRecordCanvas::copy(const char src[], size_t count) { |
| 153 |
if (nullptr == src) { |
| 154 |
return nullptr; |
| 155 |
} |
| 156 |
char* dst = fRecord->alloc<char>(count); |
| 157 |
memcpy(dst, src, count); |
| 158 |
return dst; |
| 159 |
} |
| 160 |
|
| 161 |
// As above, assuming and copying a terminating \0. |
| 162 |
template <> char* SkRecordCanvas::copy(const char* src) { return this->copy(src, strlen(src) + 1); } |
| 163 |
|
| 164 |
void SkRecordCanvas::onDrawPaint(const SkPaint& paint) { |
| 165 |
this->append<SkRecords::DrawPaint>(paint); |
| 166 |
} |
| 167 |
|
| 168 |
void SkRecordCanvas::onDrawBehind(const SkPaint& paint) { |
| 169 |
this->append<SkRecords::DrawBehind>(paint); |
| 170 |
} |
| 171 |
|
| 172 |
void SkRecordCanvas::onDrawPoints(PointMode mode, |
| 173 |
size_t count, |
| 174 |
const SkPoint pts[], |
| 175 |
const SkPaint& paint) { |
| 176 |
this->append<SkRecords::DrawPoints>(paint, mode, SkToUInt(count), this->copy(pts, count)); |
| 177 |
} |
| 178 |
|
| 179 |
void SkRecordCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) { |
| 180 |
this->append<SkRecords::DrawRect>(paint, rect); |
| 181 |
} |
| 182 |
|
| 183 |
void SkRecordCanvas::onDrawRegion(const SkRegion& region, const SkPaint& paint) { |
| 184 |
this->append<SkRecords::DrawRegion>(paint, region); |
| 185 |
} |
| 186 |
|
| 187 |
void SkRecordCanvas::onDrawOval(const SkRect& oval, const SkPaint& paint) { |
| 188 |
this->append<SkRecords::DrawOval>(paint, oval); |
| 189 |
} |
| 190 |
|
| 191 |
void SkRecordCanvas::onDrawArc(const SkRect& oval, |
| 192 |
SkScalar startAngle, |
| 193 |
SkScalar sweepAngle, |
| 194 |
bool useCenter, |
| 195 |
const SkPaint& paint) { |
| 196 |
this->append<SkRecords::DrawArc>(paint, oval, startAngle, sweepAngle, useCenter); |
| 197 |
} |
| 198 |
|
| 199 |
void SkRecordCanvas::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) { |
| 200 |
this->append<SkRecords::DrawRRect>(paint, rrect); |
| 201 |
} |
| 202 |
|
| 203 |
void SkRecordCanvas::onDrawDRRect(const SkRRect& outer, |
| 204 |
const SkRRect& inner, |
| 205 |
const SkPaint& paint) { |
| 206 |
this->append<SkRecords::DrawDRRect>(paint, outer, inner); |
| 207 |
} |
| 208 |
|
| 209 |
void SkRecordCanvas::onDrawDrawable(SkDrawable* drawable, const SkMatrix* matrix) { |
| 210 |
if (!fDrawableList) { |
| 211 |
fDrawableList = std::make_unique<SkDrawableList>(); |
| 212 |
} |
| 213 |
fDrawableList->append(drawable); |
| 214 |
this->append<SkRecords::DrawDrawable>( |
| 215 |
this->copy(matrix), drawable->getBounds(), fDrawableList->count() - 1); |
| 216 |
} |
| 217 |
|
| 218 |
void SkRecordCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) { |
| 219 |
this->append<SkRecords::DrawPath>(paint, path); |
| 220 |
} |
| 221 |
|
| 222 |
void SkRecordCanvas::onDrawImage2(const SkImage* image, |
| 223 |
SkScalar x, |
| 224 |
SkScalar y, |
| 225 |
const SkSamplingOptions& sampling, |
| 226 |
const SkPaint* paint) { |
| 227 |
this->append<SkRecords::DrawImage>(this->copy(paint), sk_ref_sp(image), x, y, sampling); |
| 228 |
} |
| 229 |
|
| 230 |
void SkRecordCanvas::onDrawImageRect2(const SkImage* image, |
| 231 |
const SkRect& src, |
| 232 |
const SkRect& dst, |
| 233 |
const SkSamplingOptions& sampling, |
| 234 |
const SkPaint* paint, |
| 235 |
SrcRectConstraint constraint) { |
| 236 |
this->append<SkRecords::DrawImageRect>( |
| 237 |
this->copy(paint), sk_ref_sp(image), src, dst, sampling, constraint); |
| 238 |
} |
| 239 |
|
| 240 |
void SkRecordCanvas::onDrawImageLattice2(const SkImage* image, |
| 241 |
const Lattice& lattice, |
| 242 |
const SkRect& dst, |
| 243 |
SkFilterMode filter, |
| 244 |
const SkPaint* paint) { |
| 245 |
int flagCount = lattice.fRectTypes ? (lattice.fXCount + 1) * (lattice.fYCount + 1) : 0; |
| 246 |
SkASSERT(lattice.fBounds); |
| 247 |
this->append<SkRecords::DrawImageLattice>(this->copy(paint), |
| 248 |
sk_ref_sp(image), |
| 249 |
lattice.fXCount, |
| 250 |
this->copy(lattice.fXDivs, lattice.fXCount), |
| 251 |
lattice.fYCount, |
| 252 |
this->copy(lattice.fYDivs, lattice.fYCount), |
| 253 |
flagCount, |
| 254 |
this->copy(lattice.fRectTypes, flagCount), |
| 255 |
this->copy(lattice.fColors, flagCount), |
| 256 |
*lattice.fBounds, |
| 257 |
dst, |
| 258 |
filter); |
| 259 |
} |
| 260 |
|
| 261 |
void SkRecordCanvas::onDrawTextBlob(const SkTextBlob* blob, |
| 262 |
SkScalar x, |
| 263 |
SkScalar y, |
| 264 |
const SkPaint& paint) { |
| 265 |
this->append<SkRecords::DrawTextBlob>(paint, sk_ref_sp(blob), x, y); |
| 266 |
} |
| 267 |
|
| 268 |
void SkRecordCanvas::onDrawSlug(const sktext::gpu::Slug* slug, const SkPaint& paint) { |
| 269 |
this->append<SkRecords::DrawSlug>(paint, sk_ref_sp(slug)); |
| 270 |
} |
| 271 |
|
| 272 |
void SkRecordCanvas::onDrawGlyphRunList(const sktext::GlyphRunList& glyphRunList, |
| 273 |
const SkPaint& paint) { |
| 274 |
sk_sp<SkTextBlob> blob = sk_ref_sp(glyphRunList.blob()); |
| 275 |
if (glyphRunList.blob() == nullptr) { |
| 276 |
blob = glyphRunList.makeBlob(); |
| 277 |
} |
| 278 |
|
| 279 |
this->onDrawTextBlob(blob.get(), glyphRunList.origin().x(), glyphRunList.origin().y(), paint); |
| 280 |
} |
| 281 |
|
| 282 |
void SkRecordCanvas::onDrawPicture(const SkPicture* pic, |
| 283 |
const SkMatrix* matrix, |
| 284 |
const SkPaint* paint) { |
| 285 |
fApproxBytesUsedBySubPictures += pic->approximateBytesUsed(); |
| 286 |
this->append<SkRecords::DrawPicture>( |
| 287 |
this->copy(paint), sk_ref_sp(pic), matrix ? *matrix : SkMatrix::I()); |
| 288 |
} |
| 289 |
|
| 290 |
void SkRecordCanvas::onDrawVerticesObject(const SkVertices* vertices, |
| 291 |
SkBlendMode bmode, |
| 292 |
const SkPaint& paint) { |
| 293 |
this->append<SkRecords::DrawVertices>( |
| 294 |
paint, sk_ref_sp(const_cast<SkVertices*>(vertices)), bmode); |
| 295 |
} |
| 296 |
|
| 297 |
void SkRecordCanvas::onDrawMesh(const SkMesh& mesh, |
| 298 |
sk_sp<SkBlender> blender, |
| 299 |
const SkPaint& paint) { |
| 300 |
this->append<SkRecords::DrawMesh>(paint, mesh, std::move(blender)); |
| 301 |
} |
| 302 |
|
| 303 |
void SkRecordCanvas::onDrawPatch(const SkPoint cubics[12], |
| 304 |
const SkColor colors[4], |
| 305 |
const SkPoint texCoords[4], |
| 306 |
SkBlendMode bmode, |
| 307 |
const SkPaint& paint) { |
| 308 |
this->append<SkRecords::DrawPatch>( |
| 309 |
paint, |
| 310 |
cubics ? this->copy(cubics, SkPatchUtils::kNumCtrlPts) : nullptr, |
| 311 |
colors ? this->copy(colors, SkPatchUtils::kNumCorners) : nullptr, |
| 312 |
texCoords ? this->copy(texCoords, SkPatchUtils::kNumCorners) : nullptr, |
| 313 |
bmode); |
| 314 |
} |
| 315 |
|
| 316 |
void SkRecordCanvas::onDrawAtlas2(const SkImage* atlas, |
| 317 |
const SkRSXform xform[], |
| 318 |
const SkRect tex[], |
| 319 |
const SkColor colors[], |
| 320 |
int count, |
| 321 |
SkBlendMode mode, |
| 322 |
const SkSamplingOptions& sampling, |
| 323 |
const SkRect* cull, |
| 324 |
const SkPaint* paint) { |
| 325 |
this->append<SkRecords::DrawAtlas>(this->copy(paint), |
| 326 |
sk_ref_sp(atlas), |
| 327 |
this->copy(xform, count), |
| 328 |
this->copy(tex, count), |
| 329 |
this->copy(colors, count), |
| 330 |
(unsigned)count, |
| 331 |
mode, |
| 332 |
sampling, |
| 333 |
this->copy(cull)); |
| 334 |
} |
| 335 |
|
| 336 |
void SkRecordCanvas::onDrawShadowRec(const SkPath& path, const SkDrawShadowRec& rec) { |
| 337 |
this->append<SkRecords::DrawShadowRec>(path, rec); |
| 338 |
} |
| 339 |
|
| 340 |
void SkRecordCanvas::onDrawAnnotation(const SkRect& rect, const char key[], SkData* value) { |
| 341 |
this->append<SkRecords::DrawAnnotation>(rect, SkString(key), sk_ref_sp(value)); |
| 342 |
} |
| 343 |
|
| 344 |
void SkRecordCanvas::onDrawEdgeAAQuad(const SkRect& rect, |
| 345 |
const SkPoint clip[4], |
| 346 |
QuadAAFlags aa, |
| 347 |
const SkColor4f& color, |
| 348 |
SkBlendMode mode) { |
| 349 |
this->append<SkRecords::DrawEdgeAAQuad>(rect, this->copy(clip, 4), aa, color, mode); |
| 350 |
} |
| 351 |
|
| 352 |
void SkRecordCanvas::onDrawEdgeAAImageSet2(const ImageSetEntry set[], |
| 353 |
int count, |
| 354 |
const SkPoint dstClips[], |
| 355 |
const SkMatrix preViewMatrices[], |
| 356 |
const SkSamplingOptions& sampling, |
| 357 |
const SkPaint* paint, |
| 358 |
SrcRectConstraint constraint) { |
| 359 |
int totalDstClipCount, totalMatrixCount; |
| 360 |
SkCanvasPriv::GetDstClipAndMatrixCounts(set, count, &totalDstClipCount, &totalMatrixCount); |
| 361 |
|
| 362 |
AutoTArray<ImageSetEntry> setCopy(count); |
| 363 |
for (int i = 0; i < count; ++i) { |
| 364 |
setCopy[i] = set[i]; |
| 365 |
} |
| 366 |
|
| 367 |
this->append<SkRecords::DrawEdgeAAImageSet>(this->copy(paint), |
| 368 |
std::move(setCopy), |
| 369 |
count, |
| 370 |
this->copy(dstClips, totalDstClipCount), |
| 371 |
this->copy(preViewMatrices, totalMatrixCount), |
| 372 |
sampling, |
| 373 |
constraint); |
| 374 |
} |
| 375 |
|
| 376 |
void SkRecordCanvas::willSave() { this->append<SkRecords::Save>(); } |
| 377 |
|
| 378 |
SkCanvas::SaveLayerStrategy SkRecordCanvas::getSaveLayerStrategy(const SaveLayerRec& rec) { |
| 379 |
AutoTArray<sk_sp<SkImageFilter>> filters(rec.fFilters.size()); |
| 380 |
for (size_t i = 0; i < rec.fFilters.size(); ++i) { |
| 381 |
filters[i] = rec.fFilters[i]; |
| 382 |
} |
| 383 |
|
| 384 |
this->append<SkRecords::SaveLayer>(this->copy(rec.fBounds), |
| 385 |
this->copy(rec.fPaint), |
| 386 |
sk_ref_sp(rec.fBackdrop), |
| 387 |
rec.fSaveLayerFlags, |
| 388 |
SkCanvasPriv::GetBackdropScaleFactor(rec), |
| 389 |
rec.fBackdropTileMode, |
| 390 |
std::move(filters)); |
| 391 |
return SkCanvas::kNoLayer_SaveLayerStrategy; |
| 392 |
} |
| 393 |
|
| 394 |
bool SkRecordCanvas::onDoSaveBehind(const SkRect* subset) { |
| 395 |
this->append<SkRecords::SaveBehind>(this->copy(subset)); |
| 396 |
return false; |
| 397 |
} |
| 398 |
|
| 399 |
void SkRecordCanvas::didRestore() { this->append<SkRecords::Restore>(this->getTotalMatrix()); } |
| 400 |
|
| 401 |
void SkRecordCanvas::didConcat44(const SkM44& m) { this->append<SkRecords::Concat44>(m); } |
| 402 |
|
| 403 |
void SkRecordCanvas::didSetM44(const SkM44& m) { this->append<SkRecords::SetM44>(m); } |
| 404 |
|
| 405 |
void SkRecordCanvas::didScale(SkScalar sx, SkScalar sy) { this->append<SkRecords::Scale>(sx, sy); } |
| 406 |
|
| 407 |
void SkRecordCanvas::didTranslate(SkScalar dx, SkScalar dy) { |
| 408 |
this->append<SkRecords::Translate>(dx, dy); |
| 409 |
} |
| 410 |
|
| 411 |
void SkRecordCanvas::onClipRect(const SkRect& rect, SkClipOp op, ClipEdgeStyle edgeStyle) { |
| 412 |
INHERITED(onClipRect, rect, op, edgeStyle); |
| 413 |
SkRecords::ClipOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); |
| 414 |
this->append<SkRecords::ClipRect>(rect, opAA); |
| 415 |
} |
| 416 |
|
| 417 |
void SkRecordCanvas::onClipRRect(const SkRRect& rrect, SkClipOp op, ClipEdgeStyle edgeStyle) { |
| 418 |
INHERITED(onClipRRect, rrect, op, edgeStyle); |
| 419 |
SkRecords::ClipOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); |
| 420 |
this->append<SkRecords::ClipRRect>(rrect, opAA); |
| 421 |
} |
| 422 |
|
| 423 |
void SkRecordCanvas::onClipPath(const SkPath& path, SkClipOp op, ClipEdgeStyle edgeStyle) { |
| 424 |
INHERITED(onClipPath, path, op, edgeStyle); |
| 425 |
SkRecords::ClipOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); |
| 426 |
this->append<SkRecords::ClipPath>(path, opAA); |
| 427 |
} |
| 428 |
|
| 429 |
void SkRecordCanvas::onClipShader(sk_sp<SkShader> cs, SkClipOp op) { |
| 430 |
INHERITED(onClipShader, cs, op); |
| 431 |
this->append<SkRecords::ClipShader>(std::move(cs), op); |
| 432 |
} |
| 433 |
|
| 434 |
void SkRecordCanvas::onClipRegion(const SkRegion& deviceRgn, SkClipOp op) { |
| 435 |
INHERITED(onClipRegion, deviceRgn, op); |
| 436 |
this->append<SkRecords::ClipRegion>(deviceRgn, op); |
| 437 |
} |
| 438 |
|
| 439 |
void SkRecordCanvas::onResetClip() { |
| 440 |
INHERITED(onResetClip); |
| 441 |
this->append<SkRecords::ResetClip>(); |
| 442 |
} |
| 443 |
|
| 444 |
sk_sp<SkSurface> SkRecordCanvas::onNewSurface(const SkImageInfo&, const SkSurfaceProps&) { |
| 445 |
return nullptr; |
| 446 |
} |