Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
graphite
SharedContext.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2021 Google LLC
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/graphite/SharedContext.h
"
9
10
#include "
include/gpu/graphite/BackendTexture.h
"
11
#include "
include/gpu/graphite/TextureInfo.h
"
12
#include "
src/gpu/graphite/Caps.h
"
13
#include "
src/gpu/graphite/CommandBuffer.h
"
14
#include "
src/gpu/graphite/GpuWorkSubmission.h
"
15
#include "
src/gpu/graphite/RendererProvider.h
"
16
#include "
src/gpu/graphite/ResourceProvider.h
"
17
18
namespace
skgpu::graphite
{
19
20
SharedContext::SharedContext
(std::unique_ptr<const Caps> caps,
BackendApi
backend
)
21
: fCaps(
std
::move(caps))
22
, fBackend(
backend
)
23
, fGlobalCache()
24
, fShaderDictionary() {}
25
26
SharedContext::~SharedContext
() {
27
// TODO: add disconnect?
28
29
// TODO: destroyResources instead?
30
}
31
32
Protected
SharedContext::isProtected
()
const
{
return
Protected
(fCaps->protectedSupport()); }
33
34
void
SharedContext::setRendererProvider(std::unique_ptr<RendererProvider> rendererProvider) {
35
// Should only be called once and be non-null
36
SkASSERT
(
rendererProvider
&& !fRendererProvider);
37
fRendererProvider = std::move(
rendererProvider
);
38
}
39
40
}
// namespace skgpu::graphite
BackendTexture.h
Caps.h
CommandBuffer.h
backend
const char * backend
Definition:
CommonFlagsConfig.cpp:42
GpuWorkSubmission.h
RendererProvider.h
ResourceProvider.h
SharedContext.h
SkASSERT
#define SkASSERT(cond)
Definition:
SkAssert.h:116
TextureInfo.h
skgpu::graphite::SharedContext::isProtected
Protected isProtected() const
Definition:
SharedContext.cpp:32
skgpu::graphite::SharedContext::SharedContext
SharedContext(std::unique_ptr< const Caps >, BackendApi)
Definition:
SharedContext.cpp:20
skgpu::graphite::SharedContext::~SharedContext
~SharedContext() override
Definition:
SharedContext.cpp:26
skgpu::graphite::SharedContext::rendererProvider
const RendererProvider * rendererProvider() const
Definition:
SharedContext.h:47
skgpu::graphite
Definition:
BoundsManagerBench.cpp:27
skgpu::BackendApi
BackendApi
Definition:
GpuTypes.h:22
skgpu::Protected
Protected
Definition:
GpuTypes.h:61
std
Definition:
ref_ptr.h:256
Generated on Sun Jun 23 2024 21:56:28 for Flutter Engine by
1.9.4