Flutter Windows Embedder
compositor.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 #ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_COMPOSITOR_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_COMPOSITOR_H_
7 
8 #include "flutter/shell/platform/embedder/embedder.h"
9 
10 namespace flutter {
11 
12 // Enables the Flutter engine to render content on Windows.
13 //
14 // The engine uses this to:
15 //
16 // 1. Create backing stores used for rendering Flutter content
17 // 2. Composite and present Flutter content and platform views onto a view
18 //
19 // Platform views are not yet supported.
20 class Compositor {
21  public:
22  virtual ~Compositor() = default;
23 
24  // Creates a backing store used for rendering Flutter content.
25  //
26  // The backing store's configuration is stored in |backing_store_out|.
27  virtual bool CreateBackingStore(const FlutterBackingStoreConfig& config,
28  FlutterBackingStore* backing_store_out) = 0;
29 
30  // Destroys a backing store and releases its resources.
31  virtual bool CollectBackingStore(const FlutterBackingStore* store) = 0;
32 
33  // Present Flutter content and platform views onto the view.
34  virtual bool Present(FlutterViewId view_id,
35  const FlutterLayer** layers,
36  size_t layers_count) = 0;
37 };
38 
39 } // namespace flutter
40 
41 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_COMPOSITOR_H_
flutter::Compositor::CollectBackingStore
virtual bool CollectBackingStore(const FlutterBackingStore *store)=0
flutter::Compositor::Present
virtual bool Present(FlutterViewId view_id, const FlutterLayer **layers, size_t layers_count)=0
flutter::Compositor::CreateBackingStore
virtual bool CreateBackingStore(const FlutterBackingStoreConfig &config, FlutterBackingStore *backing_store_out)=0
flutter::Compositor::~Compositor
virtual ~Compositor()=default
flutter::FlutterViewId
int64_t FlutterViewId
Definition: flutter_view.h:13
flutter
Definition: accessibility_bridge_windows.cc:11
flutter::Compositor
Definition: compositor.h:20