blob: a862bb640cebef1a10fa3c6bd92b8f2cd228f976 [file] [log] [blame]
Greg Daniel4684f822018-03-08 15:27:36 -05001/*
2 * Copyright 2018 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 GrUninstantiateProxyTracker_DEFINED
9#define GrUninstantiateProxyTracker_DEFINED
10
11#include "SkTArray.h"
12
13class GrSurfaceProxy;
14
15class GrUninstantiateProxyTracker {
16public:
17 GrUninstantiateProxyTracker() {}
18
19 // Adds a proxy which will be uninstantiated at the end of flush. The same proxy may not be
20 // added multiple times.
21 void addProxy(GrSurfaceProxy* proxy);
22
23 // Loops through all tracked proxies and uninstantiates them.
24 void uninstantiateAllProxies();
25
26private:
27 SkTArray<GrSurfaceProxy*> fProxies;
28};
29
30#endif