mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
f2dbeb8aa7
This reverts commit6ea69a0d43. On top of the revert, it reverted a commit in the PR: https://github.com/flutter/engine/pull/14024 This reverts commitea67e5b0b9.
54 lines
1.6 KiB
C++
54 lines
1.6 KiB
C++
// Copyright 2013 The Flutter 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_LIB_UI_COMPOSITING_SCENE_H_
|
|
#define FLUTTER_LIB_UI_COMPOSITING_SCENE_H_
|
|
|
|
#include <stdint.h>
|
|
#include <memory>
|
|
|
|
#include "flutter/flow/layers/layer_tree.h"
|
|
#include "flutter/lib/ui/dart_wrapper.h"
|
|
#include "third_party/skia/include/core/SkPicture.h"
|
|
|
|
namespace tonic {
|
|
class DartLibraryNatives;
|
|
} // namespace tonic
|
|
|
|
namespace flutter {
|
|
|
|
class Scene : public RefCountedDartWrappable<Scene> {
|
|
DEFINE_WRAPPERTYPEINFO();
|
|
FML_FRIEND_MAKE_REF_COUNTED(Scene);
|
|
|
|
public:
|
|
~Scene() override;
|
|
static fml::RefPtr<Scene> create(std::shared_ptr<flutter::Layer> rootLayer,
|
|
uint32_t rasterizerTracingThreshold,
|
|
bool checkerboardRasterCacheImages,
|
|
bool checkerboardOffscreenLayers);
|
|
|
|
std::unique_ptr<flutter::LayerTree> takeLayerTree();
|
|
|
|
Dart_Handle toImage(uint32_t width,
|
|
uint32_t height,
|
|
Dart_Handle image_callback);
|
|
|
|
void dispose();
|
|
|
|
static void RegisterNatives(tonic::DartLibraryNatives* natives);
|
|
|
|
private:
|
|
explicit Scene(std::shared_ptr<flutter::Layer> rootLayer,
|
|
uint32_t rasterizerTracingThreshold,
|
|
bool checkerboardRasterCacheImages,
|
|
bool checkerboardOffscreenLayers);
|
|
|
|
std::unique_ptr<flutter::LayerTree> layer_tree_;
|
|
};
|
|
|
|
} // namespace flutter
|
|
|
|
#endif // FLUTTER_LIB_UI_COMPOSITING_SCENE_H_
|