Flutter Engine
The Flutter Engine
GrOnFlushResourceProvider.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2017 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
9
20
23
24 // TODO: this class should probably just get a GrDirectContext
25 auto direct = fDrawingMgr->getContext()->asDirectContext();
26 if (!direct) {
27 return false;
28 }
29
30 auto resourceProvider = direct->priv().resourceProvider();
31
32 if (proxy->isLazy()) {
33 return proxy->priv().doLazyInstantiation(resourceProvider);
34 }
35
36 return proxy->instantiate(resourceProvider);
37}
38
40 return fDrawingMgr->getContext()->priv().caps();
41}
42
43#if defined(GR_TEST_UTILS)
44bool GrOnFlushResourceProvider::failFlushTimeCallbacks() const {
45 return fDrawingMgr->getContext()->priv().options().fFailFlushTimeCallbacks;
46}
47#endif
#define SkASSERT(cond)
Definition: SkAssert.h:116
const GrContextOptions & options() const
const GrCaps * caps() const
Definition: GrCaps.h:57
virtual GrDirectContext * asDirectContext()
GrResourceProvider * resourceProvider()
GrDirectContextPriv priv()
GrRecordingContext * getContext()
bool instantiateProxy(GrSurfaceProxy *)
GrRecordingContextPriv priv()
bool doLazyInstantiation(GrResourceProvider *)
virtual bool instantiate(GrResourceProvider *)=0
GrSurfaceProxyPriv priv()
bool isLazy() const
bool canSkipResourceAllocator() const