Flutter Engine
 
Loading...
Searching...
No Matches
embedder_test_backingstore_producer.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_EMBEDDER_TESTS_EMBEDDER_TEST_BACKINGSTORE_PRODUCER_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_TEST_BACKINGSTORE_PRODUCER_H_
7
8#include <memory>
9
10#include "flutter/fml/macros.h"
13#include "third_party/skia/include/core/SkSurface.h"
14#include "third_party/skia/include/gpu/ganesh/GrDirectContext.h"
15
16namespace flutter::testing {
17
19 public:
29
30 EmbedderTestBackingStoreProducer(sk_sp<GrDirectContext> context,
33
34 virtual bool Create(const FlutterBackingStoreConfig* config,
35 FlutterBackingStore* backing_store_out) = 0;
36
37 virtual sk_sp<SkSurface> GetSurface(
38 const FlutterBackingStore* backing_store) const = 0;
39
40 virtual sk_sp<SkImage> MakeImageSnapshot(
41 const FlutterBackingStore* backing_store) const = 0;
42
43 protected:
44 sk_sp<GrDirectContext> context_;
46
48};
49
50} // namespace flutter::testing
51
52#endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_TEST_BACKINGSTORE_PRODUCER_H_
GLenum type
virtual sk_sp< SkSurface > GetSurface(const FlutterBackingStore *backing_store) const =0
FML_DISALLOW_COPY_AND_ASSIGN(EmbedderTestBackingStoreProducer)
virtual sk_sp< SkImage > MakeImageSnapshot(const FlutterBackingStore *backing_store) const =0
virtual bool Create(const FlutterBackingStoreConfig *config, FlutterBackingStore *backing_store_out)=0