| Flutter Impeller |

blit_pass_gles.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_IMPELLER_RENDERER_BACKEND_GLES_BLIT_PASS_GLES_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_BLIT_PASS_GLES_H_
7
8 #include <memory>
9
10 #include "flutter/fml/macros.h"
11 #include "flutter/impeller/base/config.h"
12 #include "flutter/impeller/renderer/backend/gles/reactor_gles.h"
13 #include "flutter/impeller/renderer/blit_pass.h"
14 #include "impeller/renderer/backend/gles/blit_command_gles.h"
15
16 namespace impeller {
17
18 class BlitPassGLES final : public BlitPass,
19 public std::enable_shared_from_this<BlitPassGLES> {
20 public:
21 // |BlitPass|
22 ~BlitPassGLES() override;
23
24 private:
25 friend class CommandBufferGLES;
26
27 std::vector<std::unique_ptr<BlitEncodeGLES>> commands_;
28 ReactorGLES::Ref reactor_;
29 std::string label_;
30 bool is_valid_ = false;
31
32 explicit BlitPassGLES(ReactorGLES::Ref reactor);
33
34 // |BlitPass|
35 bool IsValid() const override;
36
37 // |BlitPass|
38 void OnSetLabel(std::string label) override;
39
40 // |BlitPass|
41 bool EncodeCommands(
42 const std::shared_ptr<Allocator>& transients_allocator) const override;
43
44 // |BlitPass|
45 bool OnCopyTextureToTextureCommand(std::shared_ptr<Texture> source,
46 std::shared_ptr<Texture> destination,
47 IRect source_region,
48 IPoint destination_origin,
49 std::string label) override;
50
51 // |BlitPass|
52 bool OnCopyTextureToBufferCommand(std::shared_ptr<Texture> source,
53 std::shared_ptr<DeviceBuffer> destination,
54 IRect source_region,
55 size_t destination_offset,
56 std::string label) override;
57
58 // |BlitPass|
59 bool OnCopyBufferToTextureCommand(BufferView source,
60 std::shared_ptr<Texture> destination,
61 IPoint destination_origin,
62 std::string label) override {
63 IMPELLER_UNIMPLEMENTED;
64 return false;
65 }
66 // |BlitPass|
67 bool OnGenerateMipmapCommand(std::shared_ptr<Texture> texture,
68 std::string label) override;
69
70 BlitPassGLES(const BlitPassGLES&) = delete;
71
72 BlitPassGLES& operator=(const BlitPassGLES&) = delete;
73 };
74
75 } // namespace impeller
76
77 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_BLIT_PASS_GLES_H_
impeller::ReactorGLES::Ref
std::shared_ptr< ReactorGLES > Ref
Definition: reactor_gles.h:87
impeller::BlitPass
Blit passes encode blit into the underlying command buffer.
Definition: blit_pass.h:26
impeller::CommandBufferGLES
Definition: command_buffer_gles.h:15
impeller::BlitPassGLES::~BlitPassGLES
~BlitPassGLES() override
blit_pass.h
blit_command_gles.h
IMPELLER_UNIMPLEMENTED
#define IMPELLER_UNIMPLEMENTED
Definition: config.h:25
impeller::BufferView
Definition: buffer_view.h:15
reactor_gles.h
impeller::BlitPassGLES
Definition: blit_pass_gles.h:18
impeller::TPoint< int64_t >
config.h
impeller
Definition: aiks_blur_unittests.cc:20
impeller::TRect< int64_t >