blob: 28bf0119b8b7f6e48929f0b10a373294c5bd1f21 [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 Phillips34cea002019-11-21 16:02:34 -050016class GrProgramInfo;
17
Brian Salomon58389b92018-03-07 13:01:25 -050018namespace sk_gpu_test {
19
20/** Makes a texture proxy containing the passed in color data. */
Brian Salomon4eda7102019-10-21 15:04:52 -040021sk_sp<GrTextureProxy> MakeTextureProxyFromData(GrContext*,
22 GrRenderable,
23 GrSurfaceOrigin,
24 const GrImageInfo&,
25 const void* data,
26 size_t rowBytes);
Brian Salomon58389b92018-03-07 13:01:25 -050027
Robert Phillips34cea002019-11-21 16:02:34 -050028GrProgramInfo* CreateProgramInfo(const GrCaps*,
29 SkArenaAlloc*,
30 const GrSurfaceProxyView* dstView,
31 GrAppliedClip&&,
32 const GrXferProcessor::DstProxyView& dstProxyView,
33 GrGeometryProcessor*, SkBlendMode,
34 GrPrimitiveType,
35 GrPipeline::InputFlags flags = GrPipeline::InputFlags::kNone,
36 const GrUserStencilSettings* stencil =
37 &GrUserStencilSettings::kUnused);
38
39
Brian Salomon58389b92018-03-07 13:01:25 -050040} // namespace sk_gpu_test
41
42#endif