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 | 34cea00 | 2019-11-21 16:02:34 -0500 | [diff] [blame] | 16 | class GrProgramInfo; |
| 17 | |
Brian Salomon | 58389b9 | 2018-03-07 13:01:25 -0500 | [diff] [blame] | 18 | namespace sk_gpu_test { |
| 19 | |
| 20 | /** Makes a texture proxy containing the passed in color data. */ |
Brian Salomon | 4eda710 | 2019-10-21 15:04:52 -0400 | [diff] [blame] | 21 | sk_sp<GrTextureProxy> MakeTextureProxyFromData(GrContext*, |
| 22 | GrRenderable, |
| 23 | GrSurfaceOrigin, |
| 24 | const GrImageInfo&, |
| 25 | const void* data, |
| 26 | size_t rowBytes); |
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*, |
Brian Salomon | 8afde5f | 2020-04-01 16:22:00 -0400 | [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, |
| 36 | GrPipeline::InputFlags flags = GrPipeline::InputFlags::kNone, |
| 37 | const GrUserStencilSettings* stencil = |
| 38 | &GrUserStencilSettings::kUnused); |
| 39 | |
| 40 | |
Brian Salomon | 58389b9 | 2018-03-07 13:01:25 -0500 | [diff] [blame] | 41 | } // namespace sk_gpu_test |
| 42 | |
| 43 | #endif |