blob: eace13f8515dd49a70815bd5c18cc8a2168e6d59 [file] [log] [blame]
Brian Salomon58389b92018-03-07 13:01:25 -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 ProxyUtils_DEFINED
9#define ProxyUtils_DEFINED
10
Mike Kleinc0bd9f92019-04-23 12:05:21 -050011#include "include/private/GrTypesPriv.h"
Brian Salomon4eda7102019-10-21 15:04:52 -040012#include "src/gpu/GrImageInfo.h"
Robert Phillips34cea002019-11-21 16:02:34 -050013#include "src/gpu/GrPipeline.h"
Greg Danielf91aeb22019-06-18 09:58:02 -040014#include "src/gpu/GrTextureProxy.h"
Brian Salomon58389b92018-03-07 13:01:25 -050015
Robert Phillips00f78de2020-07-01 16:09:43 -040016class GrDirectContext;
Robert Phillips34cea002019-11-21 16:02:34 -050017class GrProgramInfo;
18
Brian Salomon58389b92018-03-07 13:01:25 -050019namespace sk_gpu_test {
20
21/** Makes a texture proxy containing the passed in color data. */
Brian Salomon652124c2020-08-12 14:06:50 -040022GrSurfaceProxyView MakeTextureProxyViewFromData(GrDirectContext*,
23 GrRenderable,
24 GrSurfaceOrigin,
25 const GrImageInfo&,
26 const void* data,
27 size_t rowBytes);
Brian Salomon58389b92018-03-07 13:01:25 -050028
Robert Phillips34cea002019-11-21 16:02:34 -050029GrProgramInfo* CreateProgramInfo(const GrCaps*,
30 SkArenaAlloc*,
Brian Salomon8afde5f2020-04-01 16:22:00 -040031 const GrSurfaceProxyView* writeView,
Robert Phillips34cea002019-11-21 16:02:34 -050032 GrAppliedClip&&,
Robert Phillipsac6156c2020-02-28 16:02:40 -050033 const GrXferProcessor::DstProxyView&,
34 GrGeometryProcessor*,
35 SkBlendMode,
Robert Phillips34cea002019-11-21 16:02:34 -050036 GrPrimitiveType,
37 GrPipeline::InputFlags flags = GrPipeline::InputFlags::kNone,
38 const GrUserStencilSettings* stencil =
39 &GrUserStencilSettings::kUnused);
40
41
Brian Salomon58389b92018-03-07 13:01:25 -050042} // namespace sk_gpu_test
43
44#endif