Flutter Impeller
playground_impl.h
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 
5 #pragma once
6 
7 #include <memory>
8 
9 #include "flutter/fml/macros.h"
14 
15 namespace impeller {
16 
18  public:
19  static std::unique_ptr<PlaygroundImpl> Create(PlaygroundBackend backend,
20  PlaygroundSwitches switches);
21 
22  virtual ~PlaygroundImpl();
23 
24  using WindowHandle = void*;
25 
26  virtual WindowHandle GetWindowHandle() const = 0;
27 
28  virtual std::shared_ptr<Context> GetContext() const = 0;
29 
30  virtual std::unique_ptr<Surface> AcquireSurfaceFrame(
31  std::shared_ptr<Context> context) = 0;
32 
33  Vector2 GetContentScale() const;
34 
35  protected:
37 
38  explicit PlaygroundImpl(PlaygroundSwitches switches);
39 
40  private:
41  FML_DISALLOW_COPY_AND_ASSIGN(PlaygroundImpl);
42 };
43 
44 } // namespace impeller
impeller::PlaygroundImpl::GetContext
virtual std::shared_ptr< Context > GetContext() const =0
playground.h
impeller::PlaygroundBackend
PlaygroundBackend
Definition: playground.h:25
impeller::PlaygroundImpl
Definition: playground_impl.h:17
impeller::PlaygroundImpl::~PlaygroundImpl
virtual ~PlaygroundImpl()
surface.h
impeller::PlaygroundImpl::GetContentScale
Vector2 GetContentScale() const
Definition: playground_impl.cc:53
switches.h
impeller::PlaygroundImpl::Create
static std::unique_ptr< PlaygroundImpl > Create(PlaygroundBackend backend, PlaygroundSwitches switches)
Definition: playground_impl.cc:24
impeller::PlaygroundImpl::switches_
const PlaygroundSwitches switches_
Definition: playground_impl.h:36
impeller::PlaygroundImpl::GetWindowHandle
virtual WindowHandle GetWindowHandle() const =0
impeller::PlaygroundSwitches
Definition: switches.h:15
impeller::TPoint< Scalar >
context.h
impeller::PlaygroundImpl::AcquireSurfaceFrame
virtual std::unique_ptr< Surface > AcquireSurfaceFrame(std::shared_ptr< Context > context)=0
impeller::PlaygroundImpl::PlaygroundImpl
PlaygroundImpl(PlaygroundSwitches switches)
Definition: playground_impl.cc:48
impeller
Definition: aiks_context.cc:10
impeller::PlaygroundImpl::WindowHandle
void * WindowHandle
Definition: playground_impl.h:24