SkSurface_Base::~SkSurface_Base() { // in case the canvas outsurvives us, we null the callback if (fCachedCanvas) {
fCachedCanvas->setSurfaceBase(nullptr);
}
}
if (fCachedImage) { // the surface may need to fork its backend, if its sharing it with // the cached image. Note: we only call if there is an outstanding owner // on the image (besides us). bool unique = fCachedImage->unique(); if (!unique) { if (!this->onCopyOnWrite(mode)) { returnfalse;
}
}
// regardless of copy-on-write, we must drop our cached image now, so // that the next request will get our new contents.
fCachedImage.reset();
if (unique) { // Our content isn't held by any image now, so we can consider that content mutable. // Raster surfaces need to be told it's safe to consider its pixels mutable again. // We make this call after the ->unref() so the subclass can assert there are no images.
this->onRestoreBackingMutability();
}
} elseif (kDiscard_ContentChangeMode == mode) {
this->onDiscard();
} returntrue;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.