Brian Salomon | 58389b9 | 2018-03-07 13:01:25 -0500 | [diff] [blame] | 1 | /* |
| 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 Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 11 | #include "include/private/GrTypesPriv.h" |
Brian Salomon | 4eda710 | 2019-10-21 15:04:52 -0400 | [diff] [blame] | 12 | #include "src/gpu/GrImageInfo.h" |
Robert Phillips | 34cea00 | 2019-11-21 16:02:34 -0500 | [diff] [blame] | 13 | #include "src/gpu/GrPipeline.h" |
Greg Daniel | f91aeb2 | 2019-06-18 09:58:02 -0400 | [diff] [blame] | 14 | #include "src/gpu/GrTextureProxy.h" |
Brian Salomon | 58389b9 | 2018-03-07 13:01:25 -0500 | [diff] [blame] | 15 | |
Robert Phillips | 00f78de | 2020-07-01 16:09:43 -0400 | [diff] [blame] | 16 | class GrDirectContext; |
Robert Phillips | 34cea00 | 2019-11-21 16:02:34 -0500 | [diff] [blame] | 17 | class GrProgramInfo; |
Brian Salomon | dd4087d | 2020-12-23 20:36:44 -0500 | [diff] [blame] | 18 | class GrPixmap; |
Robert Phillips | 34cea00 | 2019-11-21 16:02:34 -0500 | [diff] [blame] | 19 | |
Brian Salomon | 58389b9 | 2018-03-07 13:01:25 -0500 | [diff] [blame] | 20 | namespace sk_gpu_test { |
| 21 | |
| 22 | /** Makes a texture proxy containing the passed in color data. */ |
Brian Salomon | 652124c | 2020-08-12 14:06:50 -0400 | [diff] [blame] | 23 | GrSurfaceProxyView MakeTextureProxyViewFromData(GrDirectContext*, |
| 24 | GrRenderable, |
| 25 | GrSurfaceOrigin, |
Brian Salomon | dd4087d | 2020-12-23 20:36:44 -0500 | [diff] [blame] | 26 | GrPixmap pixmap); |
Brian Salomon | 58389b9 | 2018-03-07 13:01:25 -0500 | [diff] [blame] | 27 | |
Robert Phillips | 34cea00 | 2019-11-21 16:02:34 -0500 | [diff] [blame] | 28 | GrProgramInfo* CreateProgramInfo(const GrCaps*, |
| 29 | SkArenaAlloc*, |
Adlai Holler | e2296f7 | 2020-11-19 13:41:26 -0500 | [diff] [blame] | 30 | const GrSurfaceProxyView& writeView, |
Robert Phillips | 34cea00 | 2019-11-21 16:02:34 -0500 | [diff] [blame] | 31 | GrAppliedClip&&, |
Robert Phillips | ac6156c | 2020-02-28 16:02:40 -0500 | [diff] [blame] | 32 | const GrXferProcessor::DstProxyView&, |
| 33 | GrGeometryProcessor*, |
| 34 | SkBlendMode, |
Robert Phillips | 34cea00 | 2019-11-21 16:02:34 -0500 | [diff] [blame] | 35 | GrPrimitiveType, |
Greg Daniel | d358cbe | 2020-09-11 09:33:54 -0400 | [diff] [blame] | 36 | GrXferBarrierFlags renderPassXferBarriers, |
Greg Daniel | 42dbca5 | 2020-11-20 10:22:43 -0500 | [diff] [blame] | 37 | GrLoadOp colorLoadOp, |
Robert Phillips | 34cea00 | 2019-11-21 16:02:34 -0500 | [diff] [blame] | 38 | GrPipeline::InputFlags flags = GrPipeline::InputFlags::kNone, |
| 39 | const GrUserStencilSettings* stencil = |
| 40 | &GrUserStencilSettings::kUnused); |
| 41 | |
| 42 | |
Brian Salomon | 58389b9 | 2018-03-07 13:01:25 -0500 | [diff] [blame] | 43 | } // namespace sk_gpu_test |
| 44 | |
| 45 | #endif |