blob: 717562c80a986f13d9e89b0067d59bb13061f6a1 [file] [log] [blame]
// 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_PAINTING_VERTICES_H_
#define FLUTTER_LIB_UI_PAINTING_VERTICES_H_
#include "flutter/display_list/display_list_vertices.h"
#include "flutter/lib/ui/dart_wrapper.h"
#include "third_party/skia/include/core/SkVertices.h"
#include "third_party/tonic/typed_data/typed_list.h"
namespace flutter {
class Vertices : public RefCountedDartWrappable<Vertices> {
DEFINE_WRAPPERTYPEINFO();
FML_FRIEND_MAKE_REF_COUNTED(Vertices);
public:
~Vertices() override;
static bool init(Dart_Handle vertices_handle,
DlVertexMode vertex_mode,
Dart_Handle positions_handle,
Dart_Handle texture_coordinates_handle,
Dart_Handle colors_handle,
Dart_Handle indices_handle);
const DlVertices* vertices() const { return vertices_.get(); }
size_t GetAllocationSize() const override;
private:
Vertices();
std::shared_ptr<DlVertices> vertices_;
};
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_VERTICES_H_