Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / skia / tools / gpu / BackendTextureImageFactory.h
1 /*
2  * Copyright 2020 Google LLC
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 #include "include/core/SkColor.h"
9 #include "include/core/SkImageInfo.h"
10 #include "include/core/SkRefCnt.h"
11 #include "include/gpu/GrTypes.h"
12
13 class GrDirectContext;
14 class SkColorSpace;
15 class SkImage;
16 class SkPixmap;
17 struct SkISize;
18
19 namespace sk_gpu_test {
20 /**
21  * Creates a backend texture with pixmap contents and wraps it in a SkImage that safely deletes
22  * the texture when it goes away. Unlike using makeTextureImage() on a non-GPU image, this will
23  * fail rather than fallback if the pixmaps's color type doesn't map to a supported texture format.
24  * For testing purposes the texture can be made renderable to exercise different code paths for
25  * renderable textures/formats.
26  */
27 sk_sp<SkImage> MakeBackendTextureImage(GrDirectContext*,
28                                        const SkPixmap&,
29                                        GrRenderable,
30                                        GrSurfaceOrigin);
31
32 /** Creates an image of with a solid color. */
33 sk_sp<SkImage> MakeBackendTextureImage(GrDirectContext*,
34                                        const SkImageInfo& info,
35                                        SkColor4f,
36                                        GrMipmapped = GrMipmapped::kNo,
37                                        GrRenderable = GrRenderable::kNo,
38                                        GrSurfaceOrigin = GrSurfaceOrigin::kTopLeft_GrSurfaceOrigin);
39
40 }  // namespace sk_gpu_test