Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 20f2fc8

Browse files
committed
removed mocks
1 parent f46ff8c commit 20f2fc8

File tree

1 file changed

+0
-113
lines changed

1 file changed

+0
-113
lines changed

impeller/renderer/testing/mocks.h

Lines changed: 0 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@
99
#include "impeller/core/texture.h"
1010
#include "impeller/renderer/command_buffer.h"
1111
#include "impeller/renderer/context.h"
12-
#include "impeller/renderer/pipeline_library.h"
13-
#include "impeller/renderer/render_pass.h"
1412
#include "impeller/renderer/render_target.h"
15-
#include "impeller/renderer/sampler_library.h"
16-
#include "impeller/renderer/shader_function.h"
17-
#include "impeller/typographer/typographer_context.h"
1813

1914
namespace impeller {
2015
namespace testing {
@@ -169,113 +164,5 @@ class MockTexture : public Texture {
169164
(override));
170165
};
171166

172-
class MockTypographerContext : public TypographerContext {
173-
public:
174-
MOCK_METHOD(std::shared_ptr<GlyphAtlas>,
175-
CreateGlyphAtlas,
176-
(Context & context,
177-
GlyphAtlas::Type type,
178-
std::shared_ptr<GlyphAtlasContext> atlas_context,
179-
const FontGlyphMap& font_glyph_map),
180-
(const, override));
181-
MOCK_METHOD(std::shared_ptr<GlyphAtlasContext>,
182-
CreateGlyphAtlasContext,
183-
(),
184-
(const, override));
185-
};
186-
187-
class MockRenderTargetAllocator : public RenderTargetAllocator {
188-
public:
189-
MockRenderTargetAllocator(std::shared_ptr<Allocator> allocator)
190-
: RenderTargetAllocator(allocator) {}
191-
MOCK_METHOD(std::shared_ptr<Texture>,
192-
CreateTexture,
193-
(const TextureDescriptor& desc),
194-
(override));
195-
};
196-
197-
class MockCapabilities : public Capabilities {
198-
public:
199-
MOCK_METHOD(bool, SupportsOffscreenMSAA, (), (const, override));
200-
MOCK_METHOD(bool, SupportsImplicitResolvingMSAA, (), (const, override));
201-
MOCK_METHOD(bool, SupportsSSBO, (), (const, override));
202-
MOCK_METHOD(bool, SupportsBufferToTextureBlits, (), (const, override));
203-
MOCK_METHOD(bool, SupportsTextureToTextureBlits, (), (const, override));
204-
MOCK_METHOD(bool, SupportsFramebufferFetch, (), (const, override));
205-
MOCK_METHOD(bool, SupportsCompute, (), (const, override));
206-
MOCK_METHOD(bool, SupportsComputeSubgroups, (), (const, override));
207-
MOCK_METHOD(bool, SupportsReadFromOnscreenTexture, (), (const, override));
208-
MOCK_METHOD(bool, SupportsReadFromResolve, (), (const, override));
209-
MOCK_METHOD(bool, SupportsDecalSamplerAddressMode, (), (const, override));
210-
MOCK_METHOD(bool, SupportsDeviceTransientTextures, (), (const, override));
211-
MOCK_METHOD(PixelFormat, GetDefaultColorFormat, (), (const, override));
212-
MOCK_METHOD(PixelFormat, GetDefaultStencilFormat, (), (const, override));
213-
MOCK_METHOD(PixelFormat, GetDefaultDepthStencilFormat, (), (const, override));
214-
};
215-
216-
class MockRenderPass : public RenderPass {
217-
public:
218-
MockRenderPass(std::weak_ptr<const Context> context,
219-
const RenderTarget& target)
220-
: RenderPass(context, target) {}
221-
MOCK_METHOD(bool, IsValid, (), (const, override));
222-
MOCK_METHOD(void, OnSetLabel, (std::string), (override));
223-
MOCK_METHOD(bool, OnEncodeCommands, (const Context&), (const, override));
224-
};
225-
226-
class MockSamplerLibrary : public SamplerLibrary {
227-
public:
228-
MOCK_METHOD(std::shared_ptr<const Sampler>,
229-
GetSampler,
230-
(SamplerDescriptor),
231-
(override));
232-
};
233-
234-
class MockShaderLibrary : public ShaderLibrary {
235-
public:
236-
MOCK_METHOD(bool, IsValid, (), (const, override));
237-
MOCK_METHOD(std::shared_ptr<const ShaderFunction>,
238-
GetFunction,
239-
(std::string_view name, ShaderStage stage),
240-
(override));
241-
MOCK_METHOD(void,
242-
UnregisterFunction,
243-
(std::string name, ShaderStage stage),
244-
(override));
245-
};
246-
247-
class MockShaderFunction : public ShaderFunction {
248-
public:
249-
MockShaderFunction(UniqueID parent_library_id,
250-
std::string name,
251-
ShaderStage stage)
252-
: ShaderFunction(parent_library_id, name, stage) {}
253-
};
254-
255-
class MockPipelineLibrary : public PipelineLibrary {
256-
public:
257-
MOCK_METHOD(bool, IsValid, (), (const, override));
258-
MOCK_METHOD(PipelineFuture<PipelineDescriptor>,
259-
GetPipeline,
260-
(PipelineDescriptor descriptor),
261-
(override));
262-
MOCK_METHOD(PipelineFuture<ComputePipelineDescriptor>,
263-
GetPipeline,
264-
(ComputePipelineDescriptor descriptor),
265-
(override));
266-
MOCK_METHOD(void,
267-
RemovePipelinesWithEntryPoint,
268-
(std::shared_ptr<const ShaderFunction> function),
269-
(override));
270-
};
271-
272-
template <typename T>
273-
class MockPipeline : public Pipeline<T> {
274-
public:
275-
MockPipeline(std::weak_ptr<PipelineLibrary> library, T desc)
276-
: Pipeline<T>(library, desc) {}
277-
MOCK_METHOD(bool, IsValid, (), (const, override));
278-
};
279-
280167
} // namespace testing
281168
} // namespace impeller

0 commit comments

Comments
 (0)