Flutter Engine
 
Loading...
Searching...
No Matches
context.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
8
9namespace impeller::interop {
10
11Context::Context(std::shared_ptr<impeller::Context> context)
12 : context_(std::move(context), TypographerContextSkia::Make()) {}
13
14Context::~Context() = default;
15
16bool Context::IsValid() const {
17 return context_.IsValid();
18}
19
20std::shared_ptr<impeller::Context> Context::GetContext() const {
21 return context_.GetContext();
22}
23
25 return context_;
26}
27
29 if (!IsValid()) {
30 return false;
31 }
32 return GetContext()->GetBackendType() == type;
33}
34
38
42
46
47} // namespace impeller::interop
GLenum type
std::shared_ptr< Context > GetContext() const
std::shared_ptr< impeller::Context > GetContext() const
Definition context.cc:20
bool IsBackend(impeller::Context::BackendType type) const
Definition context.cc:28
Context(const Context &)=delete
AiksContext & GetAiksContext()
Definition context.cc:24
Definition ref_ptr.h:261