forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vulkan_rasterizer.h
42 lines (29 loc) · 1.17 KB
/
vulkan_rasterizer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_CONTENT_HANDLER_VULKAN_RASTERIZER_H_
#define FLUTTER_CONTENT_HANDLER_VULKAN_RASTERIZER_H_
#include <memory>
#include "flutter/content_handler/rasterizer.h"
#include "flutter/content_handler/session_connection.h"
#include "flutter/flow/compositor_context.h"
#include "lib/ftl/macros.h"
namespace flutter_runner {
class VulkanRasterizer : public Rasterizer {
public:
VulkanRasterizer();
~VulkanRasterizer() override;
bool IsValid() const;
void SetScene(fidl::InterfaceHandle<mozart2::SceneManager> scene_manager,
mx::eventpair import_token,
ftl::Closure metrics_changed_callback) override;
void Draw(std::unique_ptr<flow::LayerTree> layer_tree,
ftl::Closure callback) override;
private:
flow::CompositorContext compositor_context_;
std::unique_ptr<SessionConnection> session_connection_;
bool valid_;
FTL_DISALLOW_COPY_AND_ASSIGN(VulkanRasterizer);
};
} // namespace flutter_runner
#endif // FLUTTER_CONTENT_HANDLER_VULKAN_RASTERIZER_H_