Flutter Engine
 
Loading...
Searching...
No Matches
gl_context_switch.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
6
7namespace flutter {
8
10
12
14
16
18 : result_(static_result) {};
19
21 return result_;
22};
23
25 : GLContextResult(static_result) {};
26
28
29GLContextSwitch::GLContextSwitch(std::unique_ptr<SwitchableGLContext> context)
30 : context_(std::move(context)) {
31 FML_CHECK(context_ != nullptr);
32 result_ = context_->SetCurrent();
33};
34
36 context_->RemoveCurrent();
37};
38
39} // namespace flutter
GLContextDefaultResult(bool static_result)
GLContextSwitch(std::unique_ptr< SwitchableGLContext > context)
#define FML_CHECK(condition)
Definition logging.h:104
Definition ref_ptr.h:261