Fix crash in nvpr text after abandoning context
Don't implement GlyphPathRange::onAbandon/onRelease. Its path range is also a GrGpuResource, registered with the gpu, and will automatically handle abandoning and releasing the actual GL objects. Don't delete the path range early, it is assumed to be a valid pointer throughout the entire lifetime of GlyphPathRange. BUG=skia: R=bsalomon@google.com, kkinnunen@nvidia.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/452273003
This commit is contained in:
parent
4596c98908
commit
3f860991ad
@ -94,18 +94,6 @@ private:
|
||||
SkDescriptor::Free(fDesc);
|
||||
}
|
||||
|
||||
virtual void onRelease() SK_OVERRIDE {
|
||||
INHERITED::onRelease();
|
||||
fPathRange.reset(NULL);
|
||||
}
|
||||
|
||||
virtual void onAbandon() SK_OVERRIDE {
|
||||
INHERITED::onAbandon();
|
||||
fPathRange->abandon();
|
||||
fPathRange.reset(NULL);
|
||||
}
|
||||
|
||||
|
||||
static const int kMaxGroupCount = (kMaxGlyphCount + (kGlyphGroupSize - 1)) / kGlyphGroupSize;
|
||||
SkDescriptor* const fDesc;
|
||||
uint8_t fLoadedGlyphs[(kMaxGroupCount + 7) >> 3]; // One bit per glyph group
|
||||
|
Loading…
Reference in New Issue
Block a user