| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |