2 * Copyright 2018 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #ifndef ProxyUtils_DEFINED
9 #define ProxyUtils_DEFINED
11 #include "include/private/gpu/ganesh/GrTypesPriv.h"
12 #include "src/gpu/ganesh/GrImageInfo.h"
13 #include "src/gpu/ganesh/GrPipeline.h"
14 #include "src/gpu/ganesh/GrTextureProxy.h"
16 class GrDirectContext;
20 namespace sk_gpu_test {
22 /** Returns the proxy backing an image if it is texture backed, otherwise nullptr. */
23 GrTextureProxy* GetTextureImageProxy(SkImage*, GrRecordingContext*);
25 /** Makes a texture proxy containing the passed in color data. */
26 GrSurfaceProxyView MakeTextureProxyViewFromData(GrDirectContext*,
32 GrProgramInfo* CreateProgramInfo(const GrCaps*,
34 const GrSurfaceProxyView& writeView,
37 const GrDstProxyView&,
41 GrXferBarrierFlags renderPassXferBarriers,
43 GrPipeline::InputFlags flags = GrPipeline::InputFlags::kNone,
44 const GrUserStencilSettings* stencil =
45 &GrUserStencilSettings::kUnused);
48 } // namespace sk_gpu_test