Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2167)

Unified Diff: mojo/skia/ganesh_context.cc

Issue 2011713003: Roll skia to 8cc209111876b7c78b5ec577c9221d8ed5e21024 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/skia/ganesh_context.h ('k') | mojo/skia/ganesh_framebuffer_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/skia/ganesh_context.cc
diff --git a/mojo/skia/ganesh_context.cc b/mojo/skia/ganesh_context.cc
index 4446ba9d6b908167d22a84c6a2a9393f157dd5ae..546a6cf069873b454079d5ee76e37995204a779c 100644
--- a/mojo/skia/ganesh_context.cc
+++ b/mojo/skia/ganesh_context.cc
@@ -28,10 +28,9 @@ GaneshContext::GaneshContext(const scoped_refptr<GLContext>& gl_context)
gl_context_->AddObserver(this);
GLContext::Scope gl_scope(gl_context_);
- ::skia::RefPtr<GrGLInterface> interface =
- ::skia::AdoptRef(CreateMojoSkiaGLBinding());
+ sk_sp<GrGLInterface> interface = CreateMojoSkiaGLBinding();
DCHECK(interface);
- gr_context_ = ::skia::AdoptRef(GrContext::Create(
+ gr_context_.reset(GrContext::Create(
kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(interface.get())));
DCHECK(gr_context_);
gr_context_->setResourceCacheLimits(kMaxGaneshResourceCacheCount,
@@ -62,7 +61,7 @@ void GaneshContext::OnContextLost() {
gl_context_->RemoveObserver(this);
if (!scope_entered_) {
gr_context_->abandonContext();
- gr_context_.clear();
+ gr_context_.reset();
}
}
@@ -94,7 +93,7 @@ GaneshContext::Scope::~Scope() {
// flushing it above.
if (ganesh_context_->is_lost()) {
ganesh_context_->gr_context_->abandonContext();
- ganesh_context_->gr_context_.clear();
+ ganesh_context_->gr_context_.reset();
}
// Do this last to avoid potential reentrance if the context is lost.
« no previous file with comments | « mojo/skia/ganesh_context.h ('k') | mojo/skia/ganesh_framebuffer_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698