Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GraphicsPipeline.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
10
11namespace skgpu::graphite {
12
13GraphicsPipeline::GraphicsPipeline(const SharedContext* sharedContext, PipelineInfo* pipelineInfo)
14 : Resource(sharedContext,
17 /*gpuMemorySize=*/0,
18 /*label=*/"GraphicsPipeline") {
19#if defined(GRAPHITE_TEST_UTILS)
20 if (pipelineInfo) {
21 fPipelineInfo.fRenderStepID = pipelineInfo->fRenderStepID;
22 fPipelineInfo.fPaintID = pipelineInfo->fPaintID;
23 fPipelineInfo.fSkSLVertexShader =
24 SkShaderUtils::PrettyPrint(pipelineInfo->fSkSLVertexShader);
25 fPipelineInfo.fSkSLFragmentShader =
26 SkShaderUtils::PrettyPrint(pipelineInfo->fSkSLFragmentShader);
27 fPipelineInfo.fNativeVertexShader = std::move(pipelineInfo->fNativeVertexShader);
28 fPipelineInfo.fNativeFragmentShader = std::move(pipelineInfo->fNativeFragmentShader);
29 }
30#endif
31}
32
34
35} // namespace skgpu::graphite
GraphicsPipeline(const SharedContext *, PipelineInfo *)
std::string PrettyPrint(const std::string &string)
Budgeted
Definition GpuTypes.h:35