Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / skia / tools / gpu / ProxyUtils.h
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
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"
15
16 class GrDirectContext;
17 class GrProgramInfo;
18 class GrCPixmap;
19
20 namespace sk_gpu_test {
21
22 /** Returns the proxy backing an image if it is texture backed, otherwise nullptr. */
23 GrTextureProxy* GetTextureImageProxy(SkImage*, GrRecordingContext*);
24
25 /** Makes a texture proxy containing the passed in color data. */
26 GrSurfaceProxyView MakeTextureProxyViewFromData(GrDirectContext*,
27                                                 GrRenderable,
28                                                 GrSurfaceOrigin,
29                                                 GrCPixmap pixmap);
30
31 #if SK_GPU_V1
32 GrProgramInfo* CreateProgramInfo(const GrCaps*,
33                                  SkArenaAlloc*,
34                                  const GrSurfaceProxyView& writeView,
35                                  bool usesMSAASurface,
36                                  GrAppliedClip&&,
37                                  const GrDstProxyView&,
38                                  GrGeometryProcessor*,
39                                  SkBlendMode,
40                                  GrPrimitiveType,
41                                  GrXferBarrierFlags renderPassXferBarriers,
42                                  GrLoadOp colorLoadOp,
43                                  GrPipeline::InputFlags flags = GrPipeline::InputFlags::kNone,
44                                  const GrUserStencilSettings* stencil =
45                                                                 &GrUserStencilSettings::kUnused);
46 #endif
47
48 }  // namespace sk_gpu_test
49
50 #endif