| Flutter Impeller |

allocator_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_ALLOCATOR_GLES_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_ALLOCATOR_GLES_H_
7
8 #include "impeller/core/allocator.h"
9 #include "impeller/renderer/backend/gles/reactor_gles.h"
10
11 namespace impeller {
12
13 class AllocatorGLES final : public Allocator {
14 public:
15 // |Allocator|
16 ~AllocatorGLES() override;
17
18 private:
19 friend class ContextGLES;
20
21 ReactorGLES::Ref reactor_;
22 bool is_valid_ = false;
23
24 explicit AllocatorGLES(ReactorGLES::Ref reactor);
25
26 // |Allocator|
27 bool IsValid() const;
28
29 // |Allocator|
30 std::shared_ptr<DeviceBuffer> OnCreateBuffer(
31 const DeviceBufferDescriptor& desc) override;
32
33 // |Allocator|
34 std::shared_ptr<Texture> OnCreateTexture(
35 const TextureDescriptor& desc) override;
36
37 // |Allocator|
38 ISize GetMaxTextureSizeSupported() const override;
39
40 AllocatorGLES(const AllocatorGLES&) = delete;
41
42 AllocatorGLES& operator=(const AllocatorGLES&) = delete;
43 };
44
45 } // namespace impeller
46
47 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_ALLOCATOR_GLES_H_
impeller::DeviceBufferDescriptor
Definition: device_buffer_descriptor.h:14
impeller::ReactorGLES::Ref
std::shared_ptr< ReactorGLES > Ref
Definition: reactor_gles.h:86
impeller::ContextGLES
Definition: context_gles.h:22
impeller::TSize
Definition: size.h:19
impeller::Allocator
An object that allocates device memory.
Definition: allocator.h:22
allocator.h
reactor_gles.h
impeller::AllocatorGLES::~AllocatorGLES
~AllocatorGLES() override
impeller::TextureDescriptor
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...
Definition: texture_descriptor.h:38
impeller
Definition: aiks_blend_unittests.cc:18
impeller::AllocatorGLES
Definition: allocator_gles.h:13