Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
include
private
SkGainmapShader.h
Go to the documentation of this file.
1
/*
2
* Copyright 2023 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 SkGainmapShader_DEFINED
9
#define SkGainmapShader_DEFINED
10
11
#include "
include/core/SkRefCnt.h
"
12
#include "
include/private/base/SkAPI.h
"
13
14
class
SkColorSpace
;
15
class
SkShader
;
16
class
SkImage
;
17
struct
SkGainmapInfo
;
18
struct
SkRect
;
19
struct
SkSamplingOptions
;
20
21
/**
22
* A gainmap shader will apply a gainmap to an base image using the math described alongside the
23
* definition of SkGainmapInfo.
24
*/
25
class
SK_API
SkGainmapShader
{
26
public
:
27
/**
28
* Make a gainmap shader.
29
*
30
* When sampling the base image baseImage, the rectangle baseRect will be sampled to map to
31
* the rectangle dstRect. Sampling will be done according to baseSamplingOptions.
32
*
33
* When sampling the gainmap image gainmapImage, the rectangle gainmapRect will be sampled to
34
* map to the rectangle dstRect. Sampling will be done according to gainmapSamplingOptions.
35
*
36
* The gainmap will be applied according to the HDR to SDR ratio specified in dstHdrRatio.
37
*
38
* This shader must know the color space of the canvas that it will be rendered to. This color
39
* space must be specified in dstColorSpace.
40
* TODO(ccameron): Remove the need for dstColorSpace.
41
*/
42
static
sk_sp<SkShader>
Make
(
const
sk_sp<const SkImage>
& baseImage,
43
const
SkRect
& baseRect,
44
const
SkSamplingOptions
& baseSamplingOptions,
45
const
sk_sp<const SkImage>
& gainmapImage,
46
const
SkRect
& gainmapRect,
47
const
SkSamplingOptions
& gainmapSamplingOptions,
48
const
SkGainmapInfo
& gainmapInfo,
49
const
SkRect
& dstRect,
50
float
dstHdrRatio,
51
sk_sp<SkColorSpace>
dstColorSpace);
52
};
53
54
#endif
SkAPI.h
SK_API
#define SK_API
Definition
SkAPI.h:35
Make
static std::unique_ptr< SkEncoder > Make(SkWStream *dst, const SkPixmap *src, const SkYUVAPixmaps *srcYUVA, const SkColorSpace *srcYUVAColorSpace, const SkJpegEncoder::Options &options)
Definition
SkJpegEncoderImpl.cpp:259
SkRefCnt.h
SkColorSpace
Definition
SkColorSpace.h:107
SkGainmapShader
Definition
SkGainmapShader.h:25
SkImage
Definition
SkImage.h:272
SkShader
Definition
SkShader.h:36
sk_sp
Definition
SkRefCnt.h:220
SkGainmapInfo
Definition
SkGainmapInfo.h:41
SkRect
Definition
extension.cpp:13
SkSamplingOptions
Definition
SkSamplingOptions.h:58
Generated on Fri Apr 26 2024 06:16:14 for Flutter Engine by
1.9.8