Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
ganesh
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
8
#include "
src/gpu/ganesh/GrOnFlushResourceProvider.h
"
9
10
#include "
include/gpu/GrDirectContext.h
"
11
#include "
include/gpu/GrRecordingContext.h
"
12
#include "
src/gpu/ganesh/GrDirectContextPriv.h
"
13
#include "
src/gpu/ganesh/GrDrawingManager.h
"
14
#include "
src/gpu/ganesh/GrProxyProvider.h
"
15
#include "
src/gpu/ganesh/GrRecordingContextPriv.h
"
16
#include "
src/gpu/ganesh/GrResourceProvider.h
"
17
#include "
src/gpu/ganesh/GrSurfaceProxy.h
"
18
#include "
src/gpu/ganesh/GrSurfaceProxyPriv.h
"
19
#include "
src/gpu/ganesh/GrTextureResolveRenderTask.h
"
20
21
bool
GrOnFlushResourceProvider::instantiateProxy
(
GrSurfaceProxy
* proxy) {
22
SkASSERT
(proxy->
canSkipResourceAllocator
());
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
39
const
GrCaps
*
GrOnFlushResourceProvider::caps
()
const
{
40
return
fDrawingMgr->
getContext
()->
priv
().
caps
();
41
}
42
43
#if defined(GR_TEST_UTILS)
44
bool
GrOnFlushResourceProvider::failFlushTimeCallbacks()
const
{
45
return
fDrawingMgr->
getContext
()->
priv
().
options
().fFailFlushTimeCallbacks;
46
}
47
#endif
GrDirectContextPriv.h
GrDirectContext.h
GrDrawingManager.h
GrOnFlushResourceProvider.h
GrProxyProvider.h
GrRecordingContextPriv.h
GrRecordingContext.h
GrResourceProvider.h
GrSurfaceProxyPriv.h
GrSurfaceProxy.h
GrTextureResolveRenderTask.h
SkASSERT
#define SkASSERT(cond)
Definition:
SkAssert.h:116
GrBaseContextPriv::options
const GrContextOptions & options() const
Definition:
GrBaseContextPriv.h:26
GrBaseContextPriv::caps
const GrCaps * caps() const
Definition:
GrBaseContextPriv.h:28
GrCaps
Definition:
GrCaps.h:57
GrContext_Base::asDirectContext
virtual GrDirectContext * asDirectContext()
Definition:
GrContext_Base.h:35
GrDirectContextPriv::resourceProvider
GrResourceProvider * resourceProvider()
Definition:
GrDirectContextPriv.h:98
GrDirectContext::priv
GrDirectContextPriv priv()
Definition:
GrDirectContextPriv.h:186
GrDrawingManager::getContext
GrRecordingContext * getContext()
Definition:
GrDrawingManager.h:135
GrOnFlushResourceProvider::caps
const GrCaps * caps() const
Definition:
GrOnFlushResourceProvider.cpp:39
GrOnFlushResourceProvider::instantiateProxy
bool instantiateProxy(GrSurfaceProxy *)
Definition:
GrOnFlushResourceProvider.cpp:21
GrRecordingContext::priv
GrRecordingContextPriv priv()
Definition:
GrRecordingContextPriv.h:231
GrSurfaceProxyPriv::doLazyInstantiation
bool doLazyInstantiation(GrResourceProvider *)
Definition:
GrSurfaceProxy.cpp:424
GrSurfaceProxy
Definition:
GrSurfaceProxy.h:49
GrSurfaceProxy::instantiate
virtual bool instantiate(GrResourceProvider *)=0
GrSurfaceProxy::priv
GrSurfaceProxyPriv priv()
Definition:
GrSurfaceProxyPriv.h:62
GrSurfaceProxy::isLazy
bool isLazy() const
Definition:
GrSurfaceProxy.h:136
GrSurfaceProxy::canSkipResourceAllocator
bool canSkipResourceAllocator() const
Definition:
GrSurfaceProxy.cpp:161
Generated on Sun Jun 23 2024 21:56:20 for Flutter Engine by
1.9.4