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

Side by Side Diff: mojo/skia/ganesh_context.h

Issue 1687653003: Slightly improve recovery from losing GL context. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | mojo/skia/ganesh_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_SKIA_GANESH_CONTEXT_H_ 5 #ifndef MOJO_SKIA_GANESH_CONTEXT_H_
6 #define MOJO_SKIA_GANESH_CONTEXT_H_ 6 #define MOJO_SKIA_GANESH_CONTEXT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void OnContextLost() override; 72 void OnContextLost() override;
73 void ReleaseContext(); 73 void ReleaseContext();
74 74
75 void EnterScope(); 75 void EnterScope();
76 void ExitScope(); 76 void ExitScope();
77 77
78 base::WeakPtr<GLContext> gl_context_; 78 base::WeakPtr<GLContext> gl_context_;
79 ::skia::RefPtr<GrContext> gr_context_; 79 ::skia::RefPtr<GrContext> gr_context_;
80 80
81 bool scope_entered_ = false; 81 bool scope_entered_ = false;
82 bool context_lost_ = false;
82 MGLContext previous_mgl_context_ = MGL_NO_CONTEXT; 83 MGLContext previous_mgl_context_ = MGL_NO_CONTEXT;
83 84
84 DISALLOW_COPY_AND_ASSIGN(GaneshContext); 85 DISALLOW_COPY_AND_ASSIGN(GaneshContext);
85 }; 86 };
86 87
87 } // namespace skia 88 } // namespace skia
88 } // namespace mojo 89 } // namespace mojo
89 90
90 #endif // MOJO_SKIA_GANESH_CONTEXT_H_ 91 #endif // MOJO_SKIA_GANESH_CONTEXT_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/skia/ganesh_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698