Use new retain() method to set up window context.

This makes our usage of sk_cf_obj consistent with Chrome.

Bug: skia:8243
Change-Id: I159339577a0e8595e7cdd47ffb9ab0653269e108
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218973
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
Jim Van Verth 2019-06-10 16:56:55 -04:00 committed by Skia Commit-Bot
parent 6d71f49e25
commit d6199ec723

View File

@ -84,7 +84,7 @@ sk_sp<SkSurface> MetalWindowContext::getBackbufferSurface() {
fCurrentDrawable = [fMetalLayer nextDrawable];
GrMtlTextureInfo fbInfo;
fbInfo.fTexture.reset(CFRetain((__bridge const void*)(fCurrentDrawable.texture)));
fbInfo.fTexture.retain((__bridge const void*)(fCurrentDrawable.texture));
GrBackendRenderTarget backendRT(fWidth,
fHeight,