Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
picture_recorder.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_LIB_UI_PAINTING_PICTURE_RECORDER_H_
6#define FLUTTER_LIB_UI_PAINTING_PICTURE_RECORDER_H_
7
8#include "flutter/display_list/dl_builder.h"
9#include "flutter/lib/ui/dart_wrapper.h"
10
11namespace flutter {
12class Canvas;
13class Picture;
14
15class PictureRecorder : public RefCountedDartWrappable<PictureRecorder> {
16 DEFINE_WRAPPERTYPEINFO();
18
19 public:
20 static void Create(Dart_Handle wrapper);
21
22 ~PictureRecorder() override;
23
25 void endRecording(Dart_Handle dart_picture);
26
27 void set_canvas(fml::RefPtr<Canvas> canvas) { canvas_ = std::move(canvas); }
28
29 private:
31
32 sk_sp<DisplayListBuilder> display_list_builder_;
33
34 fml::RefPtr<Canvas> canvas_;
35};
36
37} // namespace flutter
38
39#endif // FLUTTER_LIB_UI_PAINTING_PICTURE_RECORDER_H_
static sk_sp< Effect > Create()
sk_sp< DisplayListBuilder > BeginRecording(SkRect bounds)
void endRecording(Dart_Handle dart_picture)
void set_canvas(fml::RefPtr< Canvas > canvas)
struct _Dart_Handle * Dart_Handle
Definition dart_api.h:258
SK_API sk_sp< PrecompileShader > Picture()
#define FML_FRIEND_MAKE_REF_COUNTED(T)