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