Flutter Impeller
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 
9 namespace impeller::interop {
10 
11 Context::Context(std::shared_ptr<impeller::Context> context)
12  : context_(std::move(context), TypographerContextSkia::Make()) {}
13 
14 Context::~Context() = default;
15 
16 bool Context::IsValid() const {
17  return context_.IsValid();
18 }
19 
20 std::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 
35 bool Context::IsGL() const {
37 }
38 
39 bool Context::IsMetal() const {
41 }
42 
43 bool Context::IsVulkan() const {
45 }
46 
47 } // namespace impeller::interop
GLenum type
bool IsValid() const
Definition: aiks_context.cc:34
std::shared_ptr< Context > GetContext() const
Definition: aiks_context.cc:38
bool IsMetal() const
Definition: context.cc:39
std::shared_ptr< impeller::Context > GetContext() const
Definition: context.cc:20
bool IsBackend(impeller::Context::BackendType type) const
Definition: context.cc:28
bool IsVulkan() const
Definition: context.cc:43
bool IsValid() const
Definition: context.cc:16
Context(const Context &)=delete
AiksContext & GetAiksContext()
Definition: context.cc:24
Definition: comparable.h:95