Flutter Engine
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 "flutter/fml/macros.h"
9 #include "flutter/shell/platform/embedder/embedder.h"
10 
11 #include "third_party/skia/include/gpu/GrDirectContext.h"
12 
13 namespace flutter {
14 namespace testing {
15 
17  public:
18  enum class RenderTargetType {
22  };
23 
24  EmbedderTestBackingStoreProducer(sk_sp<GrDirectContext> context,
25  RenderTargetType type);
27 
28  bool Create(const FlutterBackingStoreConfig* config,
29  FlutterBackingStore* renderer_out);
30 
31  private:
32  bool CreateFramebuffer(const FlutterBackingStoreConfig* config,
33  FlutterBackingStore* renderer_out);
34 
35  bool CreateTexture(const FlutterBackingStoreConfig* config,
36  FlutterBackingStore* renderer_out);
37 
38  bool CreateSoftware(const FlutterBackingStoreConfig* config,
39  FlutterBackingStore* backing_store_out);
40 
41  sk_sp<GrDirectContext> context_;
42  RenderTargetType type_;
43 
45 };
46 
47 } // namespace testing
48 } // namespace flutter
49 
50 #endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_TEST_BACKINGSTORE_PRODUCER_H_
EmbedderTestBackingStoreProducer(sk_sp< GrDirectContext > context, RenderTargetType type)
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition: macros.h:27
bool Create(const FlutterBackingStoreConfig *config, FlutterBackingStore *renderer_out)