blob: 93f077f302ca6d41de06e04ee3d6aa2ed2bf19a2 [file] [log] [blame]
Robert Phillipsad248452020-06-30 09:27:52 -04001/*
2 * Copyright 2020 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef GrDirectContext_DEFINED
9#define GrDirectContext_DEFINED
10
11#include "include/gpu/GrContext.h"
12
13class GrAtlasManager;
14
15class GrDirectContext : public GrContext {
16public:
17 GrDirectContext(GrBackendApi backend, const GrContextOptions& options);
18
19 ~GrDirectContext() override;
20
21 void abandonContext() override;
22
23 void releaseResourcesAndAbandonContext() override;
24
25 void freeGpuResources() override;
26
27protected:
28 bool init() override;
29
30 GrAtlasManager* onGetAtlasManager() override { return fAtlasManager; }
31
32private:
33 GrAtlasManager* fAtlasManager;
34
35 typedef GrContext INHERITED;
36};
37
38
39#endif