Flutter Engine
gl_context_switch_test.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 
7 #include "flutter/fml/thread_local.h"
8 
9 namespace flutter {
10 namespace testing {
11 
13 
15 
17  : context_(context){};
18 
20 
22  SetCurrentContext(context_);
23  return true;
24 };
25 
28  return true;
29 };
30 
32  return context_;
33 };
34 
36  return *(current_context.get());
37 };
38 
40  current_context.reset(new int(context));
41 };
42 } // namespace testing
43 } // namespace flutter
FML_THREAD_LOCAL fml::ThreadLocalUniquePtr< int > current_context
#define FML_THREAD_LOCAL
Definition: thread_local.h:61