Index: mojo/skia/ganesh_texture_surface.cc |
diff --git a/mojo/skia/ganesh_texture_surface.cc b/mojo/skia/ganesh_texture_surface.cc |
index c296020eb557943eda48c0ece823e8e575a715bb..5b034295a26687db03c56111f1c55dea3a7bd2e3 100644 |
--- a/mojo/skia/ganesh_texture_surface.cc |
+++ b/mojo/skia/ganesh_texture_surface.cc |
@@ -34,8 +34,8 @@ GaneshTextureSurface::GaneshTextureSurface(const GaneshContext::Scope& scope, |
desc.fSampleCnt = 0; |
desc.fTextureHandle = reinterpret_cast<GrBackendObject>(&info); |
- surface_ = ::skia::AdoptRef(SkSurface::NewFromBackendTexture( |
- scope.gr_context().get(), desc, nullptr)); |
+ surface_ = SkSurface::MakeFromBackendTexture(scope.gr_context().get(), desc, |
+ nullptr); |
DCHECK(surface_); |
} |
@@ -43,7 +43,7 @@ GaneshTextureSurface::~GaneshTextureSurface() {} |
std::unique_ptr<GLTexture> GaneshTextureSurface::TakeTexture() { |
surface_->getCanvas()->flush(); |
- surface_.clear(); |
+ surface_.reset(); |
return std::move(texture_); |
} |