| 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 #include "mojo/skia/ganesh_context.h" | 5 #include "mojo/skia/ganesh_context.h" |
| 6 | 6 |
| 7 #include "mojo/public/c/gpu/MGL/mgl.h" | 7 #include <MGL/mgl.h> |
| 8 |
| 8 #include "mojo/skia/gl_bindings_skia.h" | 9 #include "mojo/skia/gl_bindings_skia.h" |
| 9 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" | 10 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" |
| 10 | 11 |
| 11 namespace mojo { | 12 namespace mojo { |
| 12 namespace skia { | 13 namespace skia { |
| 13 | 14 |
| 14 // The limit of the number of GPU resources we hold in the GrContext's | 15 // The limit of the number of GPU resources we hold in the GrContext's |
| 15 // GPU cache. | 16 // GPU cache. |
| 16 constexpr int kMaxGaneshResourceCacheCount = 2048; | 17 constexpr int kMaxGaneshResourceCacheCount = 2048; |
| 17 | 18 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 ganesh_context_->gr_context_->abandonContext(); | 96 ganesh_context_->gr_context_->abandonContext(); |
| 96 ganesh_context_->gr_context_.reset(); | 97 ganesh_context_->gr_context_.reset(); |
| 97 } | 98 } |
| 98 | 99 |
| 99 // Do this last to avoid potential reentrance if the context is lost. | 100 // Do this last to avoid potential reentrance if the context is lost. |
| 100 ganesh_context_->scope_entered_ = false; | 101 ganesh_context_->scope_entered_ = false; |
| 101 } | 102 } |
| 102 | 103 |
| 103 } // namespace skia | 104 } // namespace skia |
| 104 } // namespace mojo | 105 } // namespace mojo |
| OLD | NEW |